Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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"))        
Source by www.kdnuggets.com #
 
PREVIOUS NEXT
Tagged: #remove #whitespace #string #python
ADD COMMENT
Topic
Name
8+4 =