Python For loop Backward iteration using reversed() function


Python For loop Backward iteration using reversed() function

Program
# List of String String = ['Mon', 'Tue', 'Wednes', 'Thurs', 'Fri', 'Satur', 'Sun'] # iterate over the list of String in reverse order for val in reversed(String): print(val+"day")
Input
Output