+ 1
Why does the attached code gives none when when print(letters.reverse()) is interpreted.
2 Answers
+ 2
letters.reverse() has no return value so there is nothing to print. The reversing is done in place so the original list is reversed and no new list is created.
+ 3
Try this:
List = [1, 2, 3, 4]
List.reverse()
print(List)