Q:

Write a Python program to reverse a given list of lists

0

Write a Python program to reverse a given list of lists

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

def reverse_list_of_lists(list1):
    return list1[::-1]
colors = [['orange', 'red'], ['green', 'blue'], ['white', 'black', 'pink']]
print("Original list:")
print(colors)
print("\nReverse said list of lists:")
print(reverse_list_of_lists(colors))
nums = [[1,2,3,4], [0,2,4,5], [2,3,4,2,4]]
print("\nOriginal list:")
print(nums)
print("\nReverse said list of lists:")
print(reverse_list_of_lists(nums))

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now