read, write and open files in python code example Example: how to open a file in python f = open("demofile.txt")