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
Update for Python v3.6+ - using formatted string literals:
for n in range(1,51): print(f'test_{n}')