1) Which of the following is the correct way to create a list in python ? a) list = (1,2,3,4) b) list = [1,2,3,4] c) list = {1,2,3,4} d) list = <1,2,3,4> 2) How do you create an empty dictionary ? a) dict = {} b) dict = [] c) dict = () d) None 3) How do you add an item to a list ? a) list.add(5) b) list.append(5) c) list.insert(5) d) list.put(5) 4) What is the first index of a list in reverse ? a) 0 b) 1 c) -1 d) 2 5) How do you remove a key from a dictionary ? a) dict.pop("key") b) dict.remove("key") c) dict.delete("key") d) dict.cut("key")

Leaderboard

Visual style

Options

Switch template

Continue editing: ?