Advertisement
MatveyL

задачка q

Mar 6th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. a = input()
  2. A = []
  3. k = len(a)
  4. for i in range(k):
  5. A.append(a[i])
  6.  
  7. for i in range(k-1):
  8. if A[i] == " " and A[i+1] != " ":
  9. A[i+1] = chr(ord(A[i+1])-32)
  10. if(A[0] != " "):
  11. A[0] = chr(ord(A[0])-32)
  12. print(A)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement