como remover espaços em string no python
sentence = ' hello apple '
sentence.strip()
>>> 'hello apple'
Light Lemur
sentence = ' hello apple '
sentence.strip()
>>> 'hello apple'
# Python3 code to remove whitespace
def remove(string):
return string.replace(" ", "")
# Driver Program
string = ' g e e k '
print(remove(string))