I have a class,com_and_url, containing 2 variable, com and url. Such as:
a = com_and_url(com, url)
And a file I want to read whose content is like this:
Google
www.google.com
yahoo
www.yahoo.com
facebook
www.facebook.com
So here is the psuedo code:
list_com_and_url = []
for com, url in f:
list_com_and_url.append( com_and_url( com, url ) )
Can python do this? Thanks for the help!