How to remove spaces from a string in Python?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / glibwaresoftsolutions
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 |
What is python __ init __?
Write python logic to count the number of capital letters in a file?
Why are tuples immutable?
What is a Lambda form? Explain about assert statement?
How do I get a list of all files (and directories) in a given directory in Python?
Can dictionary have a duplicate keys ?
What is with keyword in python?
How can you explicitly free memory in python?
What advantages do numpy arrays offer over (nested) python lists?
Is indentation required in python?
What is the use of assertions in python?
What is the output for the following code?