79370697

Date: 2025-01-20 08:35:45
Score: 0.5
Natty:
Report link

I second the answer of @Friedrich as it is good practice for "real" projects, but for completeness you can try to work from the output of the dir() function :

def check_ascii(args: list[str]) -> bool:
    for s in args:
        if not s.isascii():
            return False
    return True

a, b, c = 5, 7, 0
print(dir())
# ['__annotations__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'check_ascii', 'a', 'b', 'c']
check_ascii(dir())
# True

èé = True
print(dir())
# ['__annotations__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'check_ascii', 'a', 'b', 'c', 'èé']
check_ascii(dir())
# False
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Friedrich
  • Low reputation (0.5):
Posted by: globglogabgalab