Bryce H.

asked • 02/05/23

how to type a tuple

How do you type the tuple value that has just the integer value 42 in it?


t = (42)

t = (42,) (The trailing comma is mandatory.)

t = (), .insert(42)

t = [42,]


1 Expert Answer

By:

Usama S. answered • 02/14/23

Tutor
New to Wyzant

Experienced Python, ML & SQL Teacher

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.