Jul-28-2020, 03:46 PM
How about a dictionary?
count = {'a':0, 'b':0, 'c':0} for _ in range(1, 11): choice = input('Please choose a char from a to c - ') if choice in count.keys(): count[choice] += 1 for key, value in count.items(): print(key, count)If you have a bunch of variables with similar names it often means you should be using a collection.