Increment number in string

后端 未结 5 1630
孤独总比滥情好
孤独总比滥情好 2021-01-14 09:14

I am trying to get the following output until a certain condition is met.

test_1.jpg
test_2.jpg
..
test_50.jpg

The solution (if you could remotely call

5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-14 09:47

    for j in range(1,10):
        print("test_{0}.jpg".format(j))
    

    enter image description here

提交回复
热议问题