Backstory: I wanted to try and make my first ever Pygame so I wanted to make buttons on the screen for all the alphabet letters so I made a class called buttons and wanted a for loop that will create all the buttons then in the while loop that you use in Pygame I could show all of them on the screen
What I want to do: I want to create classes and I want the classes names to be from a to z
list = ['a', 'b', 'c' etc..]
class Example():
def __init__(self, letter):
self.letter = letter
def paste():
print(self.letter)
# pasting all of the letters
def pasteall():
for i in range(len(list)):
letter = list[i]
letter.print()
# creating the variables
for i in range(len(list)):
letter = list[i]
letter = Example()
But I want the variable to be named 'a' 'b' 'c' etc... And then in the pasteall I want it to print all of the new created variables.