- cross-posted to:
- programmer_humor@programming.dev
- cross-posted to:
- programmer_humor@programming.dev
Also, do y’all call main() in the if block or do you just put the code you want to run in the if block?
Also, do y’all call main() in the if block or do you just put the code you want to run in the if block?
#!/usr/bin/env python def main() -> None: """executes when file is run as a standalone script""" print('hello world') if __name__ == '__main__': main()
print('hello world')