Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. import sys
  2.  
  3. lastStr = None
  4. curStr = sys.stdin.readline()[:-1]
  5.  
  6. resStr = ''
  7.  
  8. while (lastStr == None or curStr != lastStr) and curStr !='':
  9.     if curStr[0].isupper() == False:
  10.         resStr += curStr[0] + curStr[-1]
  11.     lastStr = curStr
  12.     curStr = sys.stdin.readline()[:-1]
  13.    
  14. print(resStr)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement