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 a function in python programming?
What does pep8 refer to?
What is ndarray in python?
How do you check if a string contains a substring in python?
Is set nesting implemented in python?
What is ord () in python?
How can you access a session in flask?
Is ruby better than python?
Explain pickling and unpickling.
Tell me what is the difference between list and tuple?
What is the difference between `deepcopy` and `shallow copy`?
How do you sort a list in reverse order in python?