Samuel Vermeulen 4 weeks ago
parent
commit
755c4b265e
  1. 18
      La_bataille.py

18
La_bataille.py

@ -0,0 +1,18 @@
cartesJ1 = input()
cartesJ2 = input()
egalite = 0
while egalite < len(cartesJ1) \
and egalite < len(cartesJ2) \
and cartesJ1[egalite] == cartesJ2[egalite]:
egalite = egalite + 1
if egalite == len(cartesJ1) and egalite == len(cartesJ2):
print("=")
elif egalite == len(cartesJ2) \
or (egalite < len(cartesJ1) and cartesJ1[egalite] < cartesJ2[egalite]):
print(1)
else:
print(2)
print(egalite)
Loading…
Cancel
Save