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