Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to remove spaces from a string in Python?

Answer Posted / nashiinformaticssolutions

Python's strip() and replace() functions can be used to eliminate spaces from a string. The replace() function eliminates all of the white spaces in the string, while the strip() function eliminates the leading and following white spaces.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to implement an 'enum' in python?

1177


Is there any way to kill a thread in python?

895


What is pandas?

832


Differentiate list and tuple with an example?

908


What are accessors, mutators, @property?

858


What are docstrings in python?

867


What is metadata in python?

844


What are loops in python?

871


Why python has no private?

835


Which is best python or r?

794


What is the purpose of uuid?

797


How does python interpreter work?

831


How are uuid generated?

773


Explain the use of the ‘nonlocal’ keyword in python?

872


What is python with statement?

802