How to remove spaces from a string in Python?

Answers were Sorted based on User's Feedback



How to remove spaces from a string in Python?..

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

How to remove spaces from a string in Python?..

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

Post New Answer

More Python Interview Questions

What is frozen set in python 3?

1 Answers  


What is the dictionary?

1 Answers  


What is the difference between uuid and guid?

1 Answers  


Tell me about a few string operations in python?

1 Answers  


What is flask-wtf and what are their features?

1 Answers  


What is oops in python?

1 Answers  


How do I debug an extension?

1 Answers  


Explain me what is the statement that can be used in python if the program requires no action but requires it syntactically?

1 Answers  


Where will you use while rather than for?

1 Answers  


What mode is used for both writing and reading in binary format in file.?

1 Answers  


What does isnull mean in python?

1 Answers  


Does anaconda automatically install python?

1 Answers  


Categories