reverse() method reverse the positions of elements of list

All list methods

reverse() takes no arguments .

Returns a copy of the main list with positions of elements reversed .
my_list=['a','b','c','d','x','y','z']
my_list.reverse()
print(my_list)
Output
['z', 'y', 'x', 'd', 'c', 'b', 'a']
All list methods Questions with solutions on List
Subscribe to our YouTube Channel here


Subscribe

* indicates required
Subscribe to plus2net

    plus2net.com



    Post your comments , suggestion , error , requirements etc here





    Python Video Tutorials
    Python SQLite Video Tutorials
    Python MySQL Video Tutorials
    Python Tkinter Video Tutorials
    We use cookies to improve your browsing experience. . Learn more
    HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
    ©2000-2024 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer