We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6fd8e4 commit e5dfba3Copy full SHA for e5dfba3
standard_lib/README.md
@@ -71,4 +71,5 @@ A collection of useful snippets using only the standard library.
71
| unicode_source_code | Example on how awesome unicode in source code is |
72
| update_dict_using_tuples | Update a dict using a list of tuples representing key-value-pairs |
73
| uuid1_example | Generate RFC compliant UUID |
74
+| variable_swapping | Swap the values of two variables in one line of code |
75
| zip_safe | Illustrates how zip is stopping if one iterable is exhausted without a warning and how to prevent it |
standard_lib/variable_swapping.py
@@ -0,0 +1,5 @@
1
+x = 4
2
+y = 5
3
+x, y = y, x
4
+print(x)
5
+print(y)
0 commit comments