angrykola

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2013年11月3日

摘要: python的语法:while与forbreak与continuerange方法与切片zip方法并行遍历enumerate产生偏移和元素while与for循环#while循环是一条通用的循环语句,主要用于计数器>>> a = []>>> x = 0>>> while x >> for i in a: print('i is ',i) i is 0i is 1......i is 9break与continue :#break立即退出循环(忽略if、while旗下的整个语句)#用while举例>>> 阅读全文
posted @ 2013-11-03 23:04 kolaman 阅读(189) 评论(0) 推荐(0)