You can use slicing to return the reversed list:
l[::-1]
More Related Contents:
- list.reverse does not return list?
- Python: Why is functools.partial necessary?
- Can you explain closures (as they relate to Python)?
- List comprehension vs. lambda + filter
- How does functools partial do what it does?
- How to use filter, map, and reduce in Python 3
- Why isn’t Python very good for functional programming? [closed]
- How to zip lists in a list
- How to call Python functions dynamically
- Composing functions in python
- Get number of items from list (or other iterable) with certain condition
- Python 3 Map function is not Calling up function
- What is the ‘pythonic’ equivalent to the ‘fold’ function from functional programming?
- How to sort with lambda in Python
- Why program functionally in Python?
- Using python map and other functional tools
- Useful code which uses reduce()? [closed]
- Any Functional Programming method of traversing a nested dictionary?
- Python recursive function to display all subsets of given set
- Modify bound variables of a closure in Python
- Functional pipes in python like %>% from R’s magrittr
- Convert JSON string to dict using Python
- How to create an SQL View with SQLAlchemy?
- Permanently adding a file path to sys.path in Python
- SyntaxError: “can’t assign to function call”
- django – convert a list back to a queryset [duplicate]
- How do I separate my models out in django?
- How would you do the equivalent of preprocessor directives in Python?
- Python: Random selection per group
- hasattr() vs try-except block to deal with non-existent attributes