CSE MCQs :: Python MCQs
-
What is the output of the following piece of code when executed in the python shell?a={1,2,3}a.intersection_update({2,3,4,5})a
- Which of the following lines of code will result in an error?
-
What is the output of the code shown below? s=set([1, 2, 3])s.union([4, 5])s|([4, 5])
-
What is the output of the line of code shown below, if s1= {1, 2, 3}?s1.issubset(s1)
-
Suppose t = (1, 2, 4, 3), which of the following is incorrect?
-
What is the output of the following piece of code when executed in Python shell?a=("Check")*3a
-
Is the following piece of code valid?a=2,3,4,5a
-
What is the output of the following code?a,b=6,7a,b=b,aa,b