I'm trying to remove all the spaces and colon from a given string, using a single function, but I'm unable to achieve these two things in a single function can someone please help me on this?
def normalize_string1(string):
return string.replace(" ", "")
def normalize_string2(string):
return string.replace(":- ", "-")
normalize_string("AIX Server--1uryeu6438shdj:-thsoanfg_321-aq.com")