Python string, numeric calculation, python string value
Python is an object-oriented language, but it does not encapsulate standard classes into libraries like C ++. Instead, it further encapsulates the classes and functions of the language, such as print, list, dict etc. it brings great convenience to programming.
Python uses # to annotate a single line, and uses ''' or "" to annotate multiple lines
Numerical Calculation
>>> Print "One hour has", 60*60, "seconds" One hour has 3600 seconds >>> result = 12 # the same line of code uses space segments to make the format clearer >>> print result12
String
In Python, "" or ''is used to represent a string, and ''one sentence is used by a single word ""
>>> Print 'here is python' Here is Python >>> print "Here is Python, too" Here is Python, too
If non-ASCII characters are used in the text, you can add #-*-coding: UTF-8-*-to the python script -*-