Python For loop Backward iteration using List Comprehension


Python For loop Backward iteration using List Comprehension

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