1.

Which of the following is not the correct syntax for creating a set?(a) set([[1,2],[3,4]])(b) set([1,2,2,3,4])(c) set((1,2,3,4))(d) {1,2,3,4}I got this question in quiz.My doubt stems from Sets topic in division Tuples and Sets of Python

Answer»

Correct CHOICE is (a) SET([[1,2],[3,4]])

For explanation: The ARGUMENT GIVEN for the set MUST be an iterable.



Discussion

No Comment Found

Related InterviewSolutions