DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
read text file in python
file = '/home/text/chapter001.txt' f=open(file,'r') data = f.read() print('data =',data)
Source by www.pythontutorial.net #
PREVIOUS
NEXT
Tagged:
#read
#text
#file
#python
ADD COMMENT
Topic
COMMENT
Name
6+7 =
Submit