Question #738   Submitted by Answiki on 11/06/2021 at 04:47:59 PM UTC

How to reverse a list in Python?

Answer   Submitted by Answiki on 10/25/2021 at 06:59:35 PM UTC

The Python method .reverse() reverse a list. Here is an example:

>>> myList=['a','b','c','d']
>>> myList.reverse()
>>> myList
['d', 'c', 'b', 'a']

3 events in history
Question by Answiki 11/06/2021 at 04:47:59 PM
How to reverse a list in Python?
Answer by Answiki on 10/25/2021 at 06:59:35 PM

The Python method .reverse() reverse a list. Here is an example:

>>> myList=['a','b','c','d']
>>> myList.reverse()
>>> myList
['d', 'c', 'b', 'a']

Question by Answiki 10/25/2021 at 06:56:49 PM
How to reverse lists in Python?
# ID Query URL Count

Icons proudly provided by Friconix.