Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # creating empty objects
- empty_l = [] # list
- empty_d = {} # dictionary
- empty_s1= set() # set
- # type check method #1
- type(empty_l)
- type(empty_d)
- type(empty_s1)
- # type check method #2
- empty_l.__class__
- empty_d.__class__
- empty_s1.__class__
- # alternative methods of creating empty set
- empty_s2 = {*{}}
- empty_s3 = {*[]}
- empty_s4 = {*()}
- empty_s5 = {0}-{0}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement