zliczacz = [0]*26napis = "aaabbcdddzzzzzz"for litera in napis: zliczacz[ord(litera)-ord("a")] += 1 print(zliczacz)
Standard input is empty
[3, 2, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!