Python: My function returns “None” after it does what I want it to [duplicate]

function return None by default, so you should return backwards explicitly

also, you can use a pythonic way to solve the problem:

letters[::-1]

Leave a Comment