moving files

This commit is contained in:
Debucquoy
2023-02-15 13:40:50 +01:00
parent 93ae5a67d2
commit 2109fa74c0
81 changed files with 126 additions and 0 deletions

27
q1/27oct/ex6.py Normal file
View File

@ -0,0 +1,27 @@
def peut_retirer(i, bag, jeu):
"""verifie si une baguette peut etre retiree """
on_top = bag[:]
for intersection in jeu:
if intersection[1] in on_top:
on_top.remove(intersection[1])
return i in on_top
def retirer(i, bag, jeu):
bag.remove(i)
for intersection in jeu:
if i in intersection:
jeu.remove(intersection)
if __name__ == "__main__":
from ex5 import creer_mikado
bag = list(range(10))
game = creer_mikado(bag)
print(game)
retirer(5, bag, game)
print(game)
# print(bag)
# print(game)
# print(peut_retirer(5, bag, game))