python的for循环语句怎么写
3 回答
![?](http://img1.sycdn.imooc.com/5458622b000117dd02200220-100-100.jpg)
不负相思意
TA贡献1777条经验 获得超10个赞
for循环列表操作方法
>>>a = [1,2,3,4]
>>>for i in a:
>>> print i,
1 2 3 4
for循环元组赋值
>>>x =[('hello','python'),('very','good')]
>>>for (a,b) in x:
>>> print (a,b)
('hello', 'python')
('very', 'good')
还有for n in range(10)这种写法
添加回答
举报
0/150
提交
取消