python common很久不用我都忘了一些函数了,给boss添麻烦了

#! /usr/bin/env python

#coding=utf-8

list=[1,2]

dict={}

dict["a"]="aa"

dict["b"]="bb"

for key,value in dict.iteritems():

    print key,value

for index,key in enumerate(list):

    print index,key

原文地址:https://www.cnblogs.com/lexus/p/2342095.html