2 ms·
What, `def main():`? Or do you mean the __name__ == "__main__" thing for distinguishing whether the code was imported?
by stavros 1y ago
What, `def main():`? Or do you mean the __name__ == "__main__" thing for distinguishing whether the code was imported?
- kens 1y agoI can successfully type "def main()" and not "function main()", unless I'm switching between JavaScript and Python and forget which language I'm in :-). It's the if statement with all the underscores that I need to check every time.
- stavros 1y agoI actually made that a keyboard macro because, even though I remember the syntax, I can't be bothered with all the special characters all the time.