Passing variables in Python
<p>I've been searching online for a while now and can't seem to find anything. I'm basically learning a few languages and I am just trying to recreate a program in different languages. </p>

<pre><code>def read_one_file():
    f = open('C:\Python27\inventory.dat', 'r')
    invid = f.readline()
    stock = f.readline()
    published = f.readline()
    price = f.readline()
    invtype = f.readline()
    title = f.readline()
    author = f.readline()
    return invid, stock, published, price, invtype, title, author

read_one_file()

print "Update Number In Stock"
print "----------------------"
print "Item ID: ", invid
</code></pre>

<p>Basically I'm trying to read in a file, absorb the data into variables then pass those variables to the main(class?). When I return them they're still not able to be printed. When I initialize them outside of read_one_file they still don't return the right thing.</p>
