Sep-28-2021, 06:21 AM
Have you used lists yet? here is an example of appending items to a list and then loop through the items of the list.
names = [] for number in range(1, 4): names.append(f"name: {number}") for name in names: print(name)
Output:name: 1
name: 2
name: 3
See if you can incorporate a list into your code.