Q. Which is a valid list creation?

A
list = (1, 2, 3)
B
list = {1, 2, 3}
C
list = [1, 2, 3]
D
list =
Solution:

list = [1, 2, 3] uses square brackets, the correct syntax for lists.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!