Python Quiz – SET in Python Welcome to your Python Quiz - SET in Python Name Email 1 SET in Python have only unique elements. Yes No 2 S1 = {1,2,3,4,3} and print (S1) will output >> 1,2,3,4,3 >> 1,2,3,3,4 >> 1,2,3,4 None 3 List can be one of the elements of a SET in Python Yes, Of course No way 4 Update method will add multiple elements to an existing SET Yes No 5 Remove and POP works in the same way to remove element Yes No 6 If S1={1,2,3,2,1} then len(S1) will be 5 3 4 2 7 If A = {1, 2, 3} and B = {2, 3, 4, 5}, then A.union(B) {1,2,3,2,3,4,5} {1,2,3,4,5} 8 If A = {1, 2, 3} and B = {2, 3, 4, 5}, then A.intersection(B) {1,4,5} {2,3} 9 If A = {1, 2, 3} and B = {2, 3, 4, 5}, then A.difference(B) {1,4,5} {1} {4,5} {1,2,3} 10 If A = {1, 2, 3, 4, 5} and B = {2,3,4} then, B.issubset(A) will output True False Related Posts