Solución
solution.tsTypeScript
from typing import List, Dict
def parse_git_log(lines: List[str]) -> List[Dict[str, str]]:
# Recorre las líneas y extrae el hash y el mensaje de cada una
result = []
for line in lines:
result.append({"hash": line[:7], "message": line[8:]})
return result
0respuestas