how can i print values of a list in reverse order python code example
Example: print list in reverse order python
languages = ['C++', 'Python', 'Scratch']
#Method1:
languages.reverse()
print(languages)
#Method2:
lang = languages[::-1]
print(lang)
languages = ['C++', 'Python', 'Scratch']
#Method1:
languages.reverse()
print(languages)
#Method2:
lang = languages[::-1]
print(lang)