0

Объясните как работает этот код?

text = input() dict = {} #ваш код for char in text: if char not in dict: dict[char]=1 else: dict[char] += 1 print(dict)

26th Jan 2022, 5:55 AM
Pavlo Lukashenko
Pavlo Lukashenko - avatar
2 Réponses
+ 2
Pavlo Lukashenko Check the explanation in Codemurai's comments https://code.sololearn.com/cebXGf11Gq58/?ref=app
26th Jan 2022, 6:04 AM
A͢J
A͢J - avatar
0
Хорошо работает
26th Jan 2022, 8:41 AM
Shadoff
Shadoff - avatar