Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string = input('> ')
- len_n = string.count('н')
- temporary_len_n = 0
- for i in string:
- if i == 'н':
- temporary_len_n += 1
- else:
- if temporary_len_n < len_n and temporary_len_n != 0:
- len_n = temporary_len_n
- temporary_len_n = 0
- string = string.replace('!','.')
- print(len_n)
- print(string)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement