+ 1
How does strip method work?
name="Heyli kh ".Rstrip() which part is wrong?
2 Answers
+ 3
strip() removes leading and trailing spaces from a string..
rstrip() removes trailing (rightmost side) spaces.. (Use Small r)
lstrip() removes leading (leftmost side) spaces..
Check :
print( " Heyli kh ".strip())
print( " Heyli kh ".rstrip())
print( " Heyli kh ".lstrip())
+ 2
Thanks all of youšš
Ipang
Jayakrishnaš®š³