SHARE
TWEET

task6

nanokatka Feb 14th, 2020 66 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
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