Order the answer to: Write a Python code that gets a file name from a user using the input statement and reads it to…