Reversing a list with single element gives None [duplicate]
问题 This question already has answers here : Appending turns my list to NoneType (3 answers) Removing item from list causes the list to become nonetype (2 answers) Closed last year . I noticed odd behaviour when returning a list (with a single element) from a function and then trying to reverse it, using reverse() I've distilled it here: def myFunction(): return ["The Smiths"] nums = [5,4,3,2,1] nums.reverse() print nums # 1,2,3,4,5 - fine! # lets use one element in a list something = ["Gwen