class Poc:
var = 0
def __init__(self):
self.fileName = "input.txt"
def readFile(self):
with open('input.txt','r+') as fr:
for line in fr:
print line
#enter code here
def main():
obj=Poc()
obj.readFile()
I was trying to pass arguments to the function and trying to read from the file. I cannot see anything happening after executing the code. I'm totally new to python please help.
I was trying to read from a file using the object.. please do share if anyone has links to learn python i couldn't find a good one.