strip() and title()

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

Leave a Reply

Your email address will not be published. Required fields are marked *