for loop

for、 rangeの使い方

max=5

for i in range(2, max+1):

    print("num="+str(i))

↓実行結果

num=2

num=3

num=4

num=5

コメント

人気の投稿