This commit is contained in:
adii1823
2021-10-28 17:37:54 +05:30
parent 8b802c5c62
commit ee641c189f
49 changed files with 601 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
# no.side.effects.py
# This file is not meant to be run
>>> numbers = [4, 1, 7, 5]
>>> sorted(numbers) # won't sort the original `numbers` list
[1, 4, 5, 7]
>>> numbers # let's verify
[4, 1, 7, 5] # good, untouched
>>> numbers.sort() # this will act on the list
>>> numbers
[1, 4, 5, 7]