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