Create 1 - The Replacements.py
This commit is contained in:
parent
467ed5c454
commit
1fa03c2b0a
5
1 - The Replacements.py
Normal file
5
1 - The Replacements.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user