Can we reverse a list in Python?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, we can reserve a list in Python using the reverse() method. The code is as follows:
defreverse(s):
str = ""
for i in s:
str = i + str
return str