Python 3 Script to Remove Leading and Trailing Spaces From String Using Strip() Method

Python 3 Script to Remove Leading and Trailing Spaces From String Using Strip() Method

Python 3 Script to Remove Leading and Trailing Spaces From String Using Strip() Method

s = "           sdfsdfdsf sdfsdfsf     "

print(s.strip())
Share on:

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Comment