0

What the hell is wrong in my print function ?¿? code in description with output

register = {"Aditya":{"Maths1":30,"Maths2":30,"Science1":30,"Science2":30,"History":30,"Geography":30,"Hindi":30,"English":30},"Atharva":{"Maths1":30,"Maths2":30,"Science1":30,"Science2":30,"History":30,"Geography":30,"Hindi":30,"English":30},"Amir":{"Maths1":30,"Maths2":30,"Science1":30,"Science2":30,"History":30,"Geography":30,"Hindi":30,"English":30},"Tanishq":{"Maths1":30,"Maths2":30,"Science1":30,"Science2":30,"History":30,"Geography":30,"Hindi":30,"English":30},"Ratan":{"Maths1":30,"Maths2":30,"Science1":30,"Science2":30,"History":30,"Geography":30,"Hindi":30,"English":30},"Samyak":{"Maths1":30,"Maths2":30,"Science1":30,"Science2":30,"History":30,"Geography":30,"Hindi":30,"English":30},"Varun":{"Maths1":30,"Maths2":30,"Science1":30,"Science2":30,"History":30,"Geography":30,"Hindi":30,"English":30} print(register["Aditya"]) Output:- File "source_file.py", line 3 print(register["Aditya"]) ^ SyntaxError: invalid syntax Process finished with exit code 1.

15th Feb 2021, 12:30 PM
Shlok Jathar
Shlok Jathar - avatar
1 Respuesta
+ 4
Just add another curly bracket at the end of your dictionary and it should work.
15th Feb 2021, 12:47 PM
noteve
noteve - avatar