Yes. For example, try the following in the interactive interpreter:
l = ['hello', 1, (4.5, 6.5)]
which creates a list containing a string, an int, and a tuple of floats.
Donna S.
asked 06/07/22Yes. For example, try the following in the interactive interpreter:
l = ['hello', 1, (4.5, 6.5)]
which creates a list containing a string, an int, and a tuple of floats.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.