Re: [Tutor] 2 basic problems

2013-06-23 Thread John Harris
Hi Charles, I have added some comments below explaining why you are not getting the results you expect: >>> 4+4 8 The above is an expression, when you hit enter python will evaluate it and give the answer. >>> 3+3=4 SyntaxError: can't assign to operator >>> 3=1 SyntaxError: can't assign to lite

Re: [Tutor] 2 basic problems

2013-06-16 Thread Alan Gauld
On 16/06/13 16:45, Chris “Kwpolska” Warrick wrote: Moreover, you could do it all in one step ('w+' stands for “clear file and allow read/write output”, while f.seek(0) is used to return the pointer back to the beginning of the file): I'm always very wary of recommending mixed read/write mode t

Re: [Tutor] 2 basic problems

2013-06-16 Thread Chris “Kwpolska” Warrick
On Wed, May 29, 2013 at 11:23 PM, charles benoit wrote: > 1:Python 2.7.4 (default, Apr 19 2013, 18:32:33) > [GCC 4.7.3] on linux2 > Type "copyright", "credits" or "license()" for more information. 4+4 > 8 3+3=4 > SyntaxError: can't assign to operator 3=1 > SyntaxError: can't assign

Re: [Tutor] 2 basic problems

2013-06-16 Thread Ricardo Aráoz
El 29/05/13 18:23, charles benoit escribió: 1:Python 2.7.4 (default, Apr 19 2013, 18:32:33) [GCC 4.7.3] on linux2 Type "copyright", "credits" or "license()" for more information. >>> 4+4 8 >>> 3+3=4 SyntaxError: can't assign to operator >>> 3=1 SyntaxError: can't assign to literal > I thought the