Math from left to right
<p>So for an assignment, I need to have python do math from left to right.</p>

<p>from reading on here,
<a href="http://www.sthurlow.com/python/lesson02/" rel="nofollow">http://www.sthurlow.com/python/lesson02/</a></p>

<p>it says that "Also remember that the math is calculated from left to right, UNLESS you put in parentheses. The innermost parentheses are calculated first."</p>

<p>but is there anyway to force python to actually do math from left to right without parentheses and to ignore order of operations?</p>

<p>my code is simply just a variable and printing it after the user inputs the math equation</p>

<pre><code>x = input("Enter numbers and operators: ")
print x
</code></pre>

<p>I need it to be able to do for example,
4 + 5 * 5 = 45</p>

<p>instead of 4+5*5 = 29 in python</p>

<p>any help is appreciated</p>

<p>edit 1</p>

<pre><code>userinput = raw_input("Enter numbers and operators: ")
parts = userinput.split()
print parts
print eval(parts)
</code></pre>

<p>I input 1 + 1 and print it and result is ['1', '+', '1']   &lt;---is this a considered a list?
I try eval(parts) and error says must be string or an object, should I be using "eval"?</p>
