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 |
How would you define a protected member in a python class ?
Explain list, tuple, set, and dictionary and provide at least one instance where each of these collection types can be used.
Write a program to read and write the binary data using python?
What are private methods in python?
Is c++ required for learning python?
What is the optional statement used in a try except statement in Python?
Can you modify the maximum depth for a recursive function in Python? If yes how?
Why do we use raw_input in python?
How do you invoke the python interpreter for interactive use?
What is flask (__ name __)?
What is the pass statement in python?
Difference between mutable and immutable in python?