In python3.x, the print () function performs a wrap-around effect, and the following example resolves that it does not wrap
Print (xxx,end= "")//Make parameter end value empty
2. Two kinds of equality in Python:
FLOAT1 = 2.5
FLOAT2 = 2.5
FLOAT3 = Float2
Where FLOAT1 is equal to FLOAT2 value and does not point to the same object
FLOAT3 is equal to FLOAT2 value, pointing to the same object
3. floating-point variable in the application, compared with the ' = = ' is not suitable
delta=0.0 000 001
if (Math.fabs (x-y) < Delta)//Gap considered equal
4. Multiple Assignments
There is another way of assigning values in Python
AInt, bInt, cInt = 15, 10, 17
Equivalent to
AInt = 15
BInt = 10
CInt = 17
Example of variable exchange:
A, B = B, a
Equivalent to
Temp = A
A = B
B = Temp
Can also be exchanged in this way
A, B, C = c,a,b// 6 Fly!
Python Learning Diary---programming Tips 1