SHARE
TWEET

Untitled

a guest Nov 18th, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top