in Technology by

Which of the following statements is used to create an empty set in Python?
a) ( )
b) [ ]
c) { }
d) set()

1 Answer

0 votes
by

Answer: d
Explanation: { } creates a dictionary not a set. Only set() creates an empty set.

Related questions

0 votes
    Which of the following statements is used to create an empty set in Python? a) ( ) b) [ ] c) { } d) set()...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    What will be the output of the following Python program? z=set('abc') z.add('san') z.update(set(['p', 'q'] ... ;, ‘c’, [‘p’, ‘q’], ‘san}...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    What arithmetic operators cannot be used with strings in Python? a) * b) – c) + d) All of the mentioned...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    What arithmetic operators cannot be used with strings in Python? a) * b) – c) + d) All of the mentioned...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    What is the order of namespaces in which Python looks for an identifier? a) Python first searches the built-in ... , then the local namespace and finally the built-in namespace...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    Which one of the following is not a keyword in Python language? a) pass b) eval c) assert d) nonlocal...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    Which function is called when the following Python program is executed? f = foo() format(f) a) str() b) format() c) __str__() d) __format__()...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    Which one of the following is not a keyword in Python language? a) pass b) eval c) assert d) nonlocal...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    Which function is called when the following Python program is executed? f = foo() format(f) a) str() b) format() c) __str__() d) __format__()...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    Which of the following is the use of id() function in python? a) Every object doesn’t have a unique id b) Id ... the object c) All of the mentioned d) None of the mentioned...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    Which of the following functions is a built-in function in python? a) factorial() b) print() c) seed() d) sqrt()...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    Which of the following is true for variable names in Python? a) underscore and ampersand are the only two special ... have leading and trailing underscores d) none of the mentioned...
asked Dec 31, 2022 in Technology by JackTerrance
0 votes
    What will be the output of the following Python code? >>>list1 = [1, 3] >>>list2 = list1 >>>list1[0] = 4 >>>print(list2) a) [1, 4] b) [1, 3, 4] c) [4, 3] d) [1, 3]...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    What will be the output of the following Python code? print('*', "abcde".center(6), '*', sep='') a) * abcde * b) *abcde * c) * abcde* d) * abcde *...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    What will be the value of ‘result’ in following Python program? list1 = [1,2,3,4] list2 = [2,4,5,6] list3 = [2,6,7,8] result ... ) [1, 7, 8] c) [1, 2, 4, 7, 8] d) error...
asked Jan 2, 2023 in Technology by JackTerrance
...