strip() and title()
m = " John"
n = "wayne "
o = "mary "
p = "POPPINS"
print('{} {}'.format(m.strip().title(), n.strip().title()))
print('{} {}'.format(o.strip().title(), p.strip().title()))
#Output:
#John Wayne
#Mary Poppins
strip() and title()
m = " John"
n = "wayne "
o = "mary "
p = "POPPINS"
print('{} {}'.format(m.strip().title(), n.strip().title()))
print('{} {}'.format(o.strip().title(), p.strip().title()))
#Output:
#John Wayne
#Mary Poppins