Add another tuple to a tuple of tuples

Build another tuple-of-tuples out of another_choice, then concatenate:

final_choices = (another_choice,) + my_choices

Alternately, consider making my_choices a list-of-tuples instead of a tuple-of-tuples by using square brackets instead of parenthesis:

my_choices=[
     ('1','first choice'),
     ('2','second choice'),
     ('3','third choice')
]

Then you could simply do:

my_choices.insert(0, another_choice)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)