FACTS
1. Python supports multiple assignments in one statement
Python will let you assign the same value to multiple variables in one statement. It will also let you assign values to multiple variables at once.
This also means swapping in Python is quicker and can be done in only 1 line of code:
2. With slicing, it’s easier to reverse a list
If we slice a list of values from starting to end but with a step of -1, we get the list right to left (reversed).



Comments
Post a Comment