Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

question 10 which of these is a valid list? 1,2,3 (1,2,3) {1,2,3} {\a\:…

Question

question 10
which of these is a valid list?
1,2,3
(1,2,3)
{1,2,3}
{\a\:1,\b\:2}

Explanation:

Brief Explanations

In Python, a list is defined using square brackets []. The option [1,2,3] uses square brackets which is the correct syntax for a list. The option (1,2,3) uses parentheses which is the syntax for a tuple. The option {1,2,3} uses curly braces which is the syntax for a set. The option {"a":1, "b":2} uses curly braces with key - value pairs which is the syntax for a dictionary.

Answer:

[1, 2, 3]