how to get back to the beginning of the file in python code example Example: python file back to beginning file.seek(0)