QuestionQ54Verified/Coding Conventions, Best Practices, and StandardizationCopy linkReport a problemAsk AstroTutorSave questionSelect the true statement concerning PEP 8 recommendations for imports.AImports should be put at the top of a file, after module comments and dosctrings.BImports should be put at the top of a file, before module comments and docstrings.CWildcard imports, for example from modulename import *, are encouraged, because they import all the module names to the global namespace.DImports should be put at the top of a file, after module globals and constants.Show AnswerAnswerExplanationPEP 8 directs that imports be placed at the top of a file, immediately after module comments and docstrings and before module globals and constants. It advises avoiding wildcard imports because they make the available namespace names unclear.Learn morePEP 8 – Style Guide for Python CodeShow comments0Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion