Q. What is the order of namespaces in which Python looks for an identifier?

  • (A) python first searches the global namespace, then the local namespace and finally the built- in namespace
  • (B) python first searches the local namespace, then the global namespace and finally the built-in namespace
  • (C) python first searches the built-in namespace, then the global namespace and finally the local namespace
  • (D) python first searches the built-in namespace, then the local namespace and finally the global namespace
πŸ’¬ Discuss
βœ… Correct Answer: (B) python first searches the local namespace, then the global namespace and finally the built-in namespace
Explanation: python first searches for the local, then the global and finally the built-in namespace.

Explanation by: Mr. Dubey
python first searches for the local, then the global and finally the built-in namespace.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
643
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
90%
Success Rate