Advertisement
here2share

# recursive_str_elim.py

Jul 31st, 2017
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.24 KB | None | 0 0
  1. # recursive_str_elim.py
  2.  
  3. def elimination(text):
  4.     if text != '':
  5.         print("Current Text: "+str(text))
  6.         text = text[:-1].strip()
  7.         elimination(text)
  8.     else:
  9.         print(text)
  10.  
  11. elimination("Hello Python World!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement