#FILE READ
#!/usr/bin/python# Open a filefo = open("sample.txt", "r")content = fo.read()print(content)# Close opened filefo.close()print ("Name of the file: ", fo.name)print ("Closed or not : ", fo.closed)print ("Opening mode : ", fo.mode)
No comments:
Post a Comment