79509689

Date: 2025-03-14 16:35:51
Score: 1
Natty:
Report link

I just implemented a solution similar to this:

import sys

stdin_str: str = None
has_stdin: bool = False
if not sys.stdin.isatty():
    stdin_str = "".join(sys.stdin)[:-1]
    has_stdin = True
    sys.stdin = open("/dev/tty", "r")
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Aaron Brockmeyer