MCQOPTIONS
Bookmark
Saved Bookmarks
→
Technical MCQs
→
2D Transformation And Answers
→
set1={0,0,9}print(set1)3.What will be the output o...
1.
set1={0,0,9}print(set1)3.What will be the output of following Python code?
A.
{3}
B.
{}
C.
{2,5,3,1}
D.
{2,5,1}
Answer» B. {}
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
set1={1,2,3}set1.add(4)set1.add(4)print(set1)10.Which of the following options will give an error if set1={2,3,4,5}?
set1={2,3}set2={3,2}set3={2,1}if(set1==set2): print("yes")else: print("no")if(set1==set3): print("yes")else: print("no")9.What will the be the result of below Python code?
set1={2,3}set2={3,2}set3={2,1}if(set1==set2): print("yes")else: print("no")if(set1==set3): print("yes")else: print("no")8.Suppose there are two sets, set1 and set2,where set1 is the superset of set2. It is required to get only the unique elements of both the sets. Which of the following will serve the purpose?
set1={"a",3,"b",3}set1.remove(3)7.What will the below Python code do?
If set1={"a","b",3}set2={3,7}6.What will the below Python code do?
list1=[1,3,4,2]x=list1.pop(2)print(set([x]))5.What will set1|set2 do?
set1={2,5,3}set2={3,1}set3={}set3=set1&set2print(set3)4.What will be the output of following Python code?
set1={0,0,9}print(set1)3.What will be the output of following Python code?
What will be the output of following Python code?
Which of the following Python code will create a set? (i) set1=set((0,9,0)) (ii) set1=set([0,2,9]) (iii) set1={}
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies