human
Give me a the Python program you requested given the following:
I am working on the file "Section 2 - Advance Python/Chapter S2.01 - Functional Programming/01.01_Functions_as_First_Class_citizens.ipynb".
The first task is:
Following DRY (Don't Repeat Yourself)
This type can be used if you have a section of code base in function is repeated in numerous places. For example, you might write a function which processes a file, and you want to accept either an open file object or a file name:
Can you write Python program for it?
assistant
#Here is the Python program you requested.

# Keepin’ it DRY

def process(file_name):
    def do_stuff(file_process):
        for line in file_process:
            print(line)

    if isinstance(file_name, str):
        with open(file_name, 'r') as f:
            do_stuff(f)
    else:
        do_stuff(file_name)
        
process(["test", "test3", "t33"])
# process("test.txt")