一直以来,使用python list 从来没有好好的使用enumerate这个函数,发现非常有用,再也不用 for i in range(len(li)):太蹩脚
一直以来,使用python list 从来没有好好的使用
1 def print_everything(*args): 2 for count, thing in enumerate(args): 3 print {0}. {1}.format(count, thing)