nanokatka

task6

Feb 14th, 2020
76
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. text=input("enter text:")
  2. text=text.split()
  3. reversedtext=''
  4. for word in text:
  5. reversedtext=reversedtext + ' ' + word[::-1]
  6. print("First:",reversedtext)
  7.  
  8.  
  9.  
  10. reversedtext=''
  11. for word in text:
  12. reversedtext=reversedtext + ' ' + word[::-1]
  13. print("Second:",reversedtext.swapcase())
  14.  
  15.  
  16.  
  17. text2=input("enter text 2:")
  18. text2=text2.split(' ')
  19. reversedtext=''
  20. for word in text2:
  21. if ',' in word:
  22. newword=word.split(',')
  23. word=''
  24. word=newword[1]+newword[0]
  25. reversedtext=reversedtext + ' ' + word[::-1]
  26. print("Third:",reversedtext)
RAW Paste Data