QuestionQ6

VerifiedPython/PyEZ

Which two statements are correct about Python lists?

Choose two
Explanation

In Python, lists are created using square brackets, such as my_list = [1, 2, 3] or an empty list my_list = []. Since an empty list is valid syntax, lists can indeed be empty and do not require at least one value. Curly braces {} are used to define dictionaries or sets, not lists.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!