python循环输出

#数字列表

for i in [1,2,3,4,5]:
    print(i)


    
#迭代处理字符串

for ch in "HelloWorld":
    print(ch)

#使用range,接收整数参数

for num in range(5):
    print("HelloWorld");

猜你喜欢

转载自blog.csdn.net/weixin_40330033/article/details/86482513
今日推荐