Friday, October 30, 2015

using strip()

.strip() removes leading and trailing spaces.

a = "    name here    "
a.strip() => "name here"

a = "   name there   ".strip()  => a = "name there"

No comments:

Post a Comment