As the title outlines, I have defined a list variable of strings and I need to print the contents of the list as part of an input line, which also includes other text, and I need the contents of the list printed to screen WITH the square brackets but WITHOUT the apostrophes.
Here is my code:
interactive_options = ['list', 'heroes', 'villains', 'search', 'reset', 'add', 'remove', 'high', 'battle', 'health', 'quit']
user_choice = input(f'''
Please enter a choice \n{interactive_options}
''')
The current output is:
Please enter a choice
['list', 'heroes', 'villains', 'search', 'reset', 'add', 'remove', 'high', 'battle', 'health', 'quit']
... whereas I need:
Please enter a choice
[list, heroes, villains, search, reset, add, remove, high, battle, health, quit]:
Note - I also need a colon printed at the end of the list contents but can't get this to work either.