I was looking through many posts here for a solution but maybe I was searching for the wrong phrase. I'm new to Python, my code problem is the following:
from yahoo_finance import Share
for line in open('fcts.txt'):
yahoo = Share('YHOO')
print (yahoo +'.' + line)
it should basically do the following but for every function inside fcts.txt:
from yahoo_finance import Share
yahoo = Share('YHOO')
print (yahoo.get_open())
while fcts.txt contains different functions like
get_open()
get_change()
...
Shareinstance.