list.reverse does not return list?

You can use slicing to return the reversed list:

l[::-1]

Leave a Comment