r/learningpython • • Feb 22 '21
Combining lower() and strip()
how do I combine lower() and strip() when using if/else statement?
2
Upvotes
r/learningpython • • Feb 22 '21
how do I combine lower() and strip() when using if/else statement?
View all comments
Show parent comment
1
u/[deleted] Feb 22 '21
Okay well Iād do something along the lines of
X = var.lower()==āā Then you can either declare y = x.strip() and use y or just simply implement x.strip() within your code