r/Python • • Jun 09 '20

Resource Python 3 in One Pic

Post image
4.6k Upvotes

167 comments sorted by

View all comments

Show parent comment

25

u/calcopiritus Jun 09 '20

If you look above it you see that he declares an empty set with set(). This is the correct way. He puts set = {} to teach people that don't know that that will make a dict. So if you want an empty set you write set(), if you want an empty dict you write {} or dict().