I'm working on a program but I'm stuck. I have created a menu with multiple options. Now I'm wondering is it possible to automatically create variables if you add a team. I.E.: normally you would enter the variable at the top and do it like teamA = input. Is it possible to do this automatically without any given variables and use of a database?
1. Add a team.
2. Look at the teams.
3. Look at the scores for the teams.
4. Add scores for the team.
loop=input("What do you want to do?")
#what goes here?
Lets say this variable you want is just a team name, you could just put all the team names in a list, and if you need to refer to them, you could do so by indexing.
teams =  if loop == 1: team = input("enter team name") teams.append(team)
Personally, I would make a team class that could hold things like members, score, or whatever you want.