勤奋花生

文章
3
资源
0
加入时间
3年1月22天

Python for循环之查找下一个记录

我们在使用for循环的时候,由于python语言的高效性,致使我们渐渐忽略了一个很重要的角色,index。      怎样查找当前记录的下一条记录呢?      li1 = [3, 4, 5, 6, 7] i = 0 for rec in li1: print "this record is: " + str(rec) if i + 1 < l

Subway

You have just moved from a quiet Waterloo neighbourhood to a big, noisy city. Instead of getting to ride your bike to school every day, you now get to walk and take the subway. Because you don't want ...