Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- from array import *
- str = "Hello world!!"
- alfavit = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
- n = 1
- col = array('i', [0])
- while n < len(alfavit):
- col.append(0)
- n = n + 1
- i = 0
- j = 0
- while i < len(str):
- while j < len(alfavit):
- if alfavit[j] == str[i]:
- col[j] = col[j] + 1
- j = j + 1
- j = 0
- i = i + 1
- print(col[11])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement