how to reference files python code example Example: how to reference a file in python with open("filename.txt","r") as f: contents = f.read()