How to print my result in dictionary format | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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 Respostas
+ 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