Search code snippets, questions, articles...

List in reverse

This snippet will allow you to create a list in reverse
# We can create a list with items of different types
b = [49, "Ebrahim", True, 4.4]
print(b)
print(b[::-1]) # Can be sliced
Was this helpful?
0 Comments
Programming Feeds
Learn something new everyday on Devsheet