ralphdc09

its102.md.wk.08.10.num01

Nov 11th, 2021 (edited)
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. # Ralph Custodio
  2. # BSIT II-A
  3.  
  4. # Create function even_reverse()
  5. def even_reverse(text_input):
  6.     input_reverse = ' '.join(i[::-1] if not len(i) % 2 else i for i in text_input.split())
  7.     return input_reverse
  8.  
  9.  
  10. # Call function even_reverse()
  11. print(even_reverse("The quick brown fox jumps over the lazy dog"))
  12. print(even_reverse("Python Exercises"))
Add Comment
Please, Sign In to add comment