PYTHON BEGINNERS - 26 : READING FILES

 HERE, YOU WILL LEARN ABOUT READING FILES THROUGH PYTHON:



employee_file = open("employee_file.txt", "r") #--> read mode, "w" - write mode(editing)   , "a" - append mode(adding data at the end of file) , "r+" - read+write mode

# print(employee_file.readline())
for employee in employee_file.readlines():
    print(employee)

employee_file.close()

Comments

Popular posts from this blog

PYTHON FULL NOTES BY SHAYAN