Showing posts with label Reading a Text File in Python. Show all posts
Showing posts with label Reading a Text File in Python. Show all posts

Friday, March 8, 2019

Reading a Text File in Python

A very simple program that I wrote using Python to read the content of the text file.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting.

work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com




Sample Program Output




Program Listing


# read.py
# Rollyn M. Moises and Jake R. Pomperada
# March 7, 2019   Thursday
# Bacolod City, Negros Occidental

print()
print("\tREADING A TEXT FILE");
print()
print("\tContent of the text file below")
print()

read_text_file = open("read.txt", "r")
content = read_text_file.read()

print(content)


Content of read.txt

   Fundamentals of Python Programming

Written By

 Mr. Rollyn M. Moises,MSCS and Mr. Jake R. Pomperada,MAED-IT

 Published  By

 Mindshapers Co. Inc. Publishing Company
 Rm 108 ICP Bldg. Recoletos Street, Intramuros, Manila

 Telephone Numbers : (02) 254-6160 and (02) 527-6489


 Email Address     : mindshapersco@yahoo.com