Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. string = input('> ')
  2. len_n = string.count('н')
  3. temporary_len_n = 0
  4. for i in string:
  5. if i == 'н':
  6. temporary_len_n += 1
  7. else:
  8. if temporary_len_n < len_n and temporary_len_n != 0:
  9. len_n = temporary_len_n
  10. temporary_len_n = 0
  11.  
  12. string = string.replace('!','.')
  13. print(len_n)
  14. print(string)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement