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 last 2 lines should return False
2: lot=('1'+'6'+'8') print(lot) a=open("acc","w") a.write(lot) a.close b=open("acc","r") b.read() print (b) b.close returns >>> 168 <open file 'acc', mode 'r' at 0xb6f9a650> >>> I thought I was saving a string to a file and reading and printing the string. The output looks like a description of the IO textwrapper at some location. I'm sure this is a syntax/format problem.but this like the other examples I saw. I ran this using python 2.6.7 on ubuntu 13.0 Thank you for any help
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor