0
Need help with Py Problem
Help people,I cant handle this problem ,I m just new at Python Programming and I am stuck this problem Explanation: """""""""""""""""""""""" You need to do a dictionary which register the many times a letter is inside a word EX: Input: 'Hello' Output: {'H':1 , 'e':1 , 'l' : 2, 'o':1} """"""""""""""""""""""""""" PD: This Problem is the first in intermediate Python
3 Answers
+ 3
l = 'hello'
dictt={ i : l.count(i) for i in l}
output:
{'h': 1, 'e': 1, 'l': 2, 'o': 1}
does this help you?
+ 3
What is the code supposed to do? What are you trying to achieve?
0
Please,May you explain me that?