Answers for "python stip whitespace str"

2

python string remove whitespace

' sss d ssd s'.replace(" ", "")
# output: 'sssdssds'
Posted by: Guest on February-25-2021
0

how to remove whitespace from string in python

def remove_witespace(data_of_string):
    string = ""
    for char in data_of_string:
        if " " not in char:
            string = string + char
            
    return string
print(remove_witespace("python is amazing programming language"))
Posted by: Guest on December-22-2021

Python Answers by Framework

Browse Popular Code Answers by Language