Issue
I have created a list that is generated from the user's inputs in my own code but I also wish to store each of the values in that list to separate variables. For example, if I have the list events = ["Football", "Volleyball", "Badminton"]
and want to store football, volleyball, and badminton all into different variables such as event1, event2, and event3 is that possible? Unfortunately, I have been unable to come up with something that works. Any help is appreciated.
Solution
I don't know if this is what you're looking for, but:
events = ["Football", "Volleyball", "Badminton"]
one = events[0]
print(one)
Answered By - Luke
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.