139k views
5 votes
How does Python recognize a tuple?

User Nickvans
by
5.1k points

2 Answers

4 votes

Answer:

Tuples can be recognized like this,

tuple = 'hello', 'world'

or tuples can be recognized like this

tuple = ('hello', 'world')

you can see the value of a tuple by simply printing it out like so,

print(tuple)

Step-by-step explanation:

User Soham Krishna Paul
by
5.6k points
4 votes

Answer:

Tuples can be recognized like this,

tuple = 'hello', 'world'

or tuples can be recognized like this

tuple = ('hello', 'world')

you can see the value of a tuple by simply printing it out like so,

print(tuple)

User Flo Scheiwiller
by
5.9k points