Vla_DOS

Untitled

Jan 4th, 2023
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.65 KB | None | 0 0
  1.  
  2. # with open("hello.txt", "w") as file:
  3. #     file.write("hello world")
  4. list = [ 'b', 'в', 'г', 'ґ', 'д', 'ж', 'з', 'й', 'к', 'л', 'м', 'н', 'п', 'р', 'с', 'т', 'ф', 'х', 'ц', 'ч', 'ш', 'щ' ]
  5. l = []
  6. with open("input.txt", "r") as file:
  7.     # for line in file:
  8.     temp = file.readlines()
  9.     for i in temp:
  10.         l = i.split(' ')
  11. count = 0
  12. for i in l:
  13.     # print(i)
  14.     for j in range(0, len(i)):
  15.         # print(i[j])
  16.         if i[j] == list[0]:
  17.             count+=1
  18.         else:
  19.             count = 0
  20.         if count >= 2:
  21.  
  22.             continue
  23. index = l.index('bbbo')
  24. print(index)
  25. # for i in l:
  26.     # print(i)
Advertisement
Add Comment
Please, Sign In to add comment