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 None 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 None 3. List can be one of the elements of a SET in Python Yes, Of course No way None 4. Update method will add multiple elements to an existing SET Yes No None 5. Remove and POP works in the same way to remove element Yes No None 6. If S1={1,2,3,2,1} then len(S1) will be 5 3 4 2 None 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} None 8. If A = {1, 2, 3} and B = {2, 3, 4, 5}, then A.intersection(B) {1,4,5} {2,3} None 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} None 10. If A = {1, 2, 3, 4, 5} and B = {2,3,4} then, B.issubset(A) will output True False None Related Posts