Text file to list in Python
<p>Suppose I have a document called test1.txt that contains the following numbers:</p>

<pre><code>133213
123123
349135
345345
</code></pre>

<p>I want to be able to take each number and append it to the end of the URL below to make a HTTP request. How do I stuff the id's into a list and call each one? This is what I have so far.</p>

<pre><code>file = open('C:\Users\Owner\Desktop\\test1.txt')
startcount = 1
endcount = len(file.readlines())

o = urllib2.build_opener( urllib2.HTTPCookieProcessor() )
urllib2.install_opener( o )

while startcount &lt; endcount:

    f = o.open( 'http://www.test.com/?userid=' + ID GOES HERE )
    f.close()
</code></pre>
