Jan-01-2019, 05:14 PM
You didn't understand the hint. I meant
def old_macdonald(name): return name[:4].capitalize() + name[4:].capitalize()By the way if you have a very long expression, you can write it on several lines with the help of parentheses
result = (foobarbazqux[100034:].capitalize() + x + bazbarquxfoo[800:812].capitalize() + quxbarfooqux("makdoland").upper())