print data from text file python code example Example: python read file Click to copywith open("file.txt", "r") as txt_file: return txt_file.readlines()