How to print my result in dictionary format | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

How to print my result in dictionary format

i have calculated percentage of student using some code and i want to print in dictionary format like {'yash':59, 'ram':68,....} please tell me the way to do that

24th Jun 2019, 11:09 AM
yash gupta
yash gupta - avatar
6 Answers
+ 6
Here‘s a possible option, yash gupta : ———————————— dic = {} for i in range(len(names)): dic[names] = some_value print(dic) ———————————— Hope this helps 😊
24th Jun 2019, 11:24 AM
aceisace
aceisace - avatar
+ 1
X = dict() print(str(X))
24th Jul 2019, 8:25 AM
Badbummer
Badbummer - avatar
+ 1
Dictionaries 👇👇👇👇👇👇👇 https://code.sololearn.com/cuWT75qxQa4o/?ref=app
16th Mar 2020, 12:33 AM
Saurabh Kahar
0
Hy
28th Jun 2019, 11:26 PM
Abdel Simour
Abdel Simour - avatar
0
Hmmmm
30th Jun 2019, 1:24 PM
Anointing Ososanya
Anointing Ososanya - avatar