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 |
Optionally, what statements can you put under a try-except block?
What is a unit test in Python?
Why python is called portable?
Can I create apps with python?
What is an interpreter for python?
What is python in simple words?
How do you comment in python?
What is the purpose of the "//" operator in python?
What are the differences between pass and continue?
What are python variables?
What is super () __ init__ in python?
What are global variables in python?