Search code examples
python-3.xlisttuplesdefinition

Are you able to assign a definition to each value in a tuple?


I am not sure how to add definitions to values in a tuple.

I've searched various websites and Q & A on Stack Overflow but I couldn't find an answer

-

-


Solution

  • It seems like what you are looking for is a dictionary.

    This is an example:

    dict = {"Pizza": "Tasty", "number": 2}
    

    This apply's Pizza as Tasty, and number as 2.