python 20171115学习记录

2023-01-31 02:01:02 python 学习 记录

遍历列表

def travel(string):

index = 0

while index < len(string):

letter = string[index]

print letter

index = index + 1

a = "12ww1wwwwww"

print travel(a)

boGon:hhhhh zhouhaijun$ python py_02.py 

1

2

w

w

1

w

w

w

w

w

w




相关文章