readme = open (r'c:\users\user\desktop\br.txt','r',encoding = 'utf-8')
print (readme.read)
I have been trying to open a file, but this script isn't working, it says
built-in method read of _io.TextIOWrapper object at 0x00000000036A83A8
readme = open (r'c:\users\user\desktop\br.txt','r',encoding = 'utf-8')
print (readme.read)
I have been trying to open a file, but this script isn't working, it says
built-in method read of _io.TextIOWrapper object at 0x00000000036A83A8
you want to call readme.read()
method to read file.
readme = open (r'c:\users\user\desktop\br.txt','r',encoding = 'utf-8')
readme.read()
if you want to read file line by line you can use.
readme.readlines()