empty set in python
# Important: This syntax will create an empty dictionary and not an empty set
a = {}
print(type(a))
# An empty set can be created using the below syntax:
b = set()
print(type(b))
empty set in python
# Important: This syntax will create an empty dictionary and not an empty set
a = {}
print(type(a))
# An empty set can be created using the below syntax:
b = set()
print(type(b))
initialize empty set in python
# to create an empty set we use the set() method without any arguements
emptyset = set()
# we can't use {} to create a set (rather a dictionary is created)
d = {}
# type(d) --> <class 'dict'>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us