Answers for "remove spaces from a list"

3

python remove spaces

string=' t e s t ' 
print(string.replace(' ',''))
Posted by: Guest on October-14-2020
0

python remove spaces

#If you want to remove LEADING and ENDING spaces, use str.strip():

sentence = ' hello  apple'
sentence.strip()
>>> 'hello  apple'
Posted by: Guest on July-20-2021

Code answers related to "remove spaces from a list"

Python Answers by Framework

Browse Popular Code Answers by Language