I am curious, what do the 3 different brackets mean in Python programming? Not sure if I'm correct about this, but please correct me if I'm wrong:
[] - # Normally used for dictionaries, list items
() - # Used to identify params
{} - # I have no idea what this does...
Or if these brackets can be used for other purposes, any advice is welcomed! Thanks!
[]
: Used to define mutable data types - lists, list comprehensions and for indexing/lookup/slicing.()
: Define tuples, order of operations, generator expressions, function calls and other syntax.{}
: The two hash table types - dictionaries and sets.