Reformat a Git Log
easypy_stringsImplement reformat_git_log(inp, out).
Read a git log from the text stream inp and write a reformatted version to the
text stream out (return nothing). Each input line is tab-separated:
<sha-1>\t<date>\t<author>\t<email>\t<message>. Each output line is the
first 7 characters of the sha, then enough dots so the line is exactly 80
characters wide, then the message — e.g.
0cd8619....................................................Update PEP 512 (#107).
Your solution
Edit reformat_git_log and run the real pytest suite in your browser — no install required. Your code is saved locally.
Loading the Python runtime (first run only)…
Hints
Hint 1
Iterate the input stream line by line; split each line on tabs — field 0 is the sha, the last field is the message.
Hint 2
Write sha[:7], then dots filling up to width 80, then the message and a newline.