Python 遍历数组的方法
程序员文章站
2022-07-15 08:21:30
...
1 使用for in
people = ["李白","杜甫","我"]
for peo in people:
print(peo)
2 使用range
people = ["李白","杜甫","我"]
for i in range(0, len(people)):
print(people[i])
上一篇: 用栈来实现二进制数转化为十进制数
下一篇: 十进制转化为二进制