Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

remove spaces from input python

# Python3 code to remove whitespace
def remove(string):
    return string.replace(" ", "")
      
# Driver Program
string = ' g e e k '
print(remove(string))
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #remove #spaces #input #python
ADD COMMENT
Topic
Name
5+1 =