killerbng icon

Test if u need to strip text

killerbng | PRO | 06/30/15 06:11:23 AM UTC | 0 ⭐ | 500 👁️ | Never ⏰ | []
Python |

210 B

|

None

|

0 👍

/

0 👎

a = "              hellllooooooo                  "
b ="hello"
def space(letter):
    if letter != letter.strip():
        print("you must strip")
    else:
        print("no need to strip")
 
space(a)
space(b)

Comments