I have the following code:
readFromFile = open('C:\\Users\\sunka\\Desktop\\exampleFile.txt','r')
<_io.TextIOWrapper name='C:\\Users\\sunka\\Desktop\\exampleFile.txt' mode='r' encoding='cp1252'>
readFromFile variable is a file object, that you can read data from.
readlines function returns array of lines inside that opened file.
So what you want to do is:
with open('C:\Users\sunka\Desktop\exampleFile.txt','r') as file_obj: print(file_obj.readlines())
Take a closer look at the docs next time.