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
How will you check if all characters in a string are alphanumeric?
What is matplotlib for python?
What is __ main __ in python?
Do you know how memory is managed in python?
Which python memory profiler is recommended?
How to retrieve data from a table in mysql database through python code?
How can you find length of a tuple in python?
Why we are using def keyword for method?
Which are the file related libraries/modules in python?
How do you invoke the python interpreter for interactive use?
Is set nesting implemented in python?
What is the main use of python?
What are range and xrange?
What is a numpy array?
What can I build with python?