This is probably a stretch. I have a def (or function) that takes a file name, opens the file and performs action on the file content. Is there a way in Python to use a variable in place of the file name? In other words give a string or list file attributes.
def Albert(fname):
f = open(fname, 'r')
for i in f.readline():
print(i)
#Main
Collins = 'Blues Guitar\n'
Albert(Collins)