79076136

Date: 2024-10-10 21:02:18
Score: 1.5
Natty:
Report link

(Derivative of Winston's answer)

pathlib makes it easy to manipulate the module's filename:

import __main__
from pathlib import Path

main_name = Path(__main__.__file__).stem
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Adam Gausmann