The code is supposed to show what number corresponds to the print output every time the loop is ran. Is there a better/cleaner way to do this?
counter = 1
i = 0
while i < 5:
print(f"{counter} Hello World!")
counter += 1
i += 1
output:
1 Hello World!
2 Hello World!
3 Hello World!
4 Hello World!
5 Hello World!