Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Mással_h = ["b", "c", "d", "f", "g", "h", "j",\
- "k", "l", "m", "n", "p", "r", "s",\
- "t", "v", "z","q", "w", "x","y"]
- file = open("note.txt","r")
- def nice(sor):
- g = 0
- k = 0
- i3 = None
- i2 = None
- sor = sor.strip()
- lista = list(sor)
- while ' ' in lista:
- lista.remove(' ')
- while '.' in lista:
- lista.remove('.')
- while ',' in lista:
- lista.remove(',')
- for i in lista:
- if k >= 2:
- if i3 not in Mással_h and i2 in Mással_h and i in Mással_h:
- g += 1
- i3 = i2
- i2 = i
- k += 1
- return g
- for i in file:
- print(nice(i),'darab van a sorban!')
- file.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement