Python is the first delicious, so you can exchange variables conveniently and quickly! Why python ?! Because temporary variables are not required for switching variables in python! For example:
A, B, c = B, C,
Let's look at a complicated example. Let's look at the well-known "Bubble Sorting:
Array = [ 1 , 2 , 5 , 3 , 6 , 8 , 4 ]
For I In Range (LEN (array) - 1 , 1 , - 1 ):
For J In Range (0, I ):
If Array [J] > Array [J + 1 ]:
Array [J], array [J + 1 ] = Array [J + 1 ], Array [J]
Print Array
Well, we'll eat it here today. Please pay close attention to it. There will be more delicious meals waiting for you in the future!
Python daily delicious series (total)
Python daily delicious (1)-variable exchange
Python daily delicious (2)-the art of character Traversal
Python daily delicious (3)-character conversion
Python daily delicious (4)-isinstance determines the object type
Python daily delicious (5)-ljust just Center
...