Do not repr results if they contain hypens (eg. negative numbers)
This commit is contained in:
parent
7384395c35
commit
58557e0496
1 changed files with 1 additions and 1 deletions
2
aoc
2
aoc
|
@ -81,7 +81,7 @@ def run_command(args: list[str], stdin=None) -> tuple[int, str]:
|
|||
|
||||
|
||||
def format_result(v: str) -> str:
|
||||
if len(v) == len("".join(filter(lambda x: x.isalpha() or x.isdigit(), v))):
|
||||
if len(v) == len("".join(filter(lambda x: x.isalpha() or x.isdigit() or x == "-", v))):
|
||||
return v
|
||||
return repr(v)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue