#-*-coding:cp936-*-print ' data types and variables ' print, -8080print 100-8080print 0x10print 1.23e5print 1.2e-5print ' I\ ' m\ ' OK\ '! ' #r ' indicates ' that the string inside ' is not escaped by default, print R ' \\\t\\ ' #用 ' ' instead of \ n ' means newline print ' ' Line1line2line3 ' Print Boolean, Python-sensitive ' print Trueprint Falseprint ' 3>2 ' Print 3>2print ' and or not ' operation ' Print true and Trueprint true and Falseprint False and Falseprint '--- ------------------' age = 10if age >= 18:print ' adult ' else:print ' teenager ' print '----------variable-----------' A = 123 # A is the whole The number of print AA = ' abc ' Print Aprint '----------string variable can be interpreted as a pointer-----------' a = ' ABC ' b = aa = ' xyz ' Print Aprint bprint '----------in py In Thon, constants are usually represented in all uppercase variable names, but Python does not use the Const keyword to guarantee-----------'
In Cmd, the CLS is used to clear the screen. When the content can be used for a long time!
Python data types and variables