modes of opening a txt file pythhon code example Example: python read file with open("file.txt", "r") as txt_file: return txt_file.readlines()