#import csv module and call open(), reader()
#solution accepts input identifying name of CSV file ("input1.csv")
#solution outputs each row of CSV file contents as a dictionary of elements
import csv

#accept string input identifying filename
print("Enter the name of the file along with its extension:")
file_name = input()

#open, read, and output the new file contents in the reverse order
with open(file_name, 'r' , newline = '') as csvfile:
    reader = csv.reader(csvfile)       
    for row in reader:
        reverse_row = row[::-1]
        print(reverse_row)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: