+ 1
Curly braces
What are curly braces used for? {} these symbols.
5 Réponses
+ 1
They are used for making dictionary in python
https://www.sololearn.com/learn/Python/2450/
+ 1
In python, curly braces used for making dictionary and sets.
dictionary, a key-value pair.
my_dic = {1:1, 2:4, 3:9}
sets, don't have an item more than once.
my_set = {1,4,9}
curly braces are also used to declare empty dictionaries (but not empty sets)
e.g.
emp_dic ={}
but,
wmp_set= set()
+ 1
Thanks everyone. You’re all awesome.
0
to curl your mind :)
0
Lol 😂.