python learning_operation

1. Data Type

1.1 Numbers

Integer type int, such as 2

float type float, such as 3.14 and 314E-2

Complex number complex, such as (-5+4)

1.2 Boolean values

Real or fake

1 or 0

1.3 Strings

'hello world'

2. Data operation

http://www.runoob.com/python/python-operators.html

3. Ternary operation

 1 result = value 1 if condition else value 2 

If condition is true: result = value 1
If condition is false: result = value 2

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324395719&siteId=291194637