Sep-24-2018, 05:26 PM
As it is, looks like you are trying to print the 'txt' attribute of Employees class.
Or you want to print the content of the file?
Write into the file:
Or you want to print the content of the file?
Write into the file:
with open("Employees.txt"), 'a') as employee_file: employee_file.write("\nToby - Human resources") employee_file.write("\nKelly - Customer service")Read and print the content:
with open("Employees.txt"), 'r') as employee_file: # open for reading data = employee_file.read() print(data)