Python: Set

https://www.programiz.com/python-programming/set

# initialize a with {}
a = {}

# check data type of a
# Output: <class 'dict'>
print(type(a))

# initialize a with set()
a = set()

# check data type of a
# Output: <class 'set'>
print(type(a))

Comments

Popular posts from this blog

Python: pickle and copyreg

Swift: Codable

Java - Writing your own JUnit Rule