Advertisement
killerbng

Test if u need to strip text

Jun 30th, 2015
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. a = "              hellllooooooo                  "
  2. b ="hello"
  3. def space(letter):
  4.     if letter != letter.strip():
  5.         print("you must strip")
  6.     else:
  7.         print("no need to strip")
  8.  
  9. space(a)
  10. space(b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement