Python reverse a list April 28, 2020 Uncategorized list0=['Confirmed Cases','Recovered Cases', 'Deaths Reported','Active Cases']CopyCopy def Reverse(lst): return [ele for ele in reversed(lst)] list1=Reverse(list0) list1CopyCopy ['Active Cases', 'Deaths Reported', 'Recovered Cases', 'Confirmed Cases'] Copy Share this:TwitterFacebookLinkedInPinterestTumblrRedditLike this:Like Loading...
April 28, 2020 Uncategorized list0=['Confirmed Cases','Recovered Cases', 'Deaths Reported','Active Cases']CopyCopy def Reverse(lst): return [ele for ele in reversed(lst)] list1=Reverse(list0) list1CopyCopy ['Active Cases', 'Deaths Reported', 'Recovered Cases', 'Confirmed Cases'] Copy Share this:TwitterFacebookLinkedInPinterestTumblrRedditLike this:Like Loading...