Create 1 - The Replacements.py

This commit is contained in:
Lukas Baumann 2021-02-18 08:23:30 +01:00 committed by GitHub
parent 467ed5c454
commit 1fa03c2b0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

5
1 - The Replacements.py Normal file
View File

@ -0,0 +1,5 @@
def replace(l, X, Y):
while X in l:
i = l.index(X)
l.pop(i)
l.insert(i, Y)