zliczacz = [0]*26napis = "aaaaabbzzzzzzz"for litera in napis: zliczacz[ord(litera) - ord('a')] += 1print(zliczacz)
Standard input is empty
[5, 2, 0, 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!