Q:

Write a Python program to remove spaces from a given string

0

Write a Python program to remove spaces from a given string.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

def remove_spaces(str1):
  str1 = str1.replace(' ','')
  return str1
    
print(remove_spaces("w 3 res ou r ce"))
print(remove_spaces("a b c"))

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now