QuestionQ6Verified/Python/PyEZCopy linkReport a problemAsk AstroTutorSave questionWhich two statements are correct about Python lists?Choose twoALists can be empty.BLists are defined using curly braces.CLists must have at least one value assigned to them.DLists are defined using square brackets.Show AnswerAnswerExplanationIn 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 morePython Lists - Official Python DocumentationShow comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion