Curly braces | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Curly braces

What are curly braces used for? {} these symbols.

18th May 2020, 4:34 AM
Zach Janzen
5 Answers
+ 1
They are used for making dictionary in python https://www.sololearn.com/learn/Python/2450/
18th May 2020, 4:42 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 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()
18th May 2020, 4:44 AM
M Tamim
M Tamim - avatar
+ 1
Thanks everyone. You’re all awesome.
18th May 2020, 5:56 AM
Zach Janzen
0
to curl your mind :)
19th May 2020, 3:29 AM
Ahmed Muhammed
Ahmed Muhammed - avatar
0
Lol 😂.
19th May 2020, 3:36 AM
Zach Janzen