Proposition de corrigé de la partie programmation
Code:
def get_chunk(msg: str, i: int, size: int) -> str:
start = i * size
end = start + size
if end > len(msg):
return ""
return msg[start:end]
start = i * size
end = start + size
if end > len(msg):
return ""
return msg[start:end]
Modifié le: vendredi, 27 janvier 2023, 16:27