Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (1.5k points)
I am a beginner in Java, can someone help with what is the common header format of Python files.

1 Answer

0 votes
by (1.4k points)

This is how developers of Python often arrange their modules/python files. 

  • The first line of each file should be #!/usr/bin/env python.  

  • Doing this helps to run the file as a script invoking the interpreter implicitly. 

  • Next it should be the docstring with a description followed by built-in modules, followed by third-party modules, followed by any changes to the path and your own modules 

Related questions

Browse Categories

...