Hello,
I have a question regarding "the python way" to do stuff.
The goal is simple.
1) Open a file
2) Parse it's content
3) split it to a list and move forward.
The file is URL list, really straightforward:
www.google.com
www.yahoo.com
www.bbc.com
The code is like this:
ulist = open('url.txt', 'r')
lines = ulist.read()
lines = lines.split('\n')
# for some reason there is a newline as a last item of the list, so i have to
lines = lines.remove('')
How can i do it better?