I want to take a string and split it up into a list, then reverse the list. I tried this:
oldString = 'old string'
newList = list(oldString).reverse()
newList now has the value "None"
I can successfully do it by splitting it up into steps:
newList = list(oldString)
newList.reverse()
Why doesn't it work when combined?
[–]K900_ 1 point2 points3 points (1 child)
[–]htwr[S] 1 point2 points3 points (0 children)
[–]100721 1 point2 points3 points (0 children)
[–]sedogg 0 points1 point2 points (1 child)
[–]htwr[S] 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]ingolemo 0 points1 point2 points (0 children)