0 votes
in Python by
Can we reverse a list in Python?

1 Answer

0 votes
by

Yes, we can reserve a list in Python using the reverse() method. The code can be depicted as follows.

def reverse(s): 

  str = "" 

  for i in s: 

    str = i + str

  return str

...