Tag: Global vs Local Variables
-
Python Questions and Answers – Global vs Local Variables – 2
Python Multiple Choice Questions & Answers (MCQs) focuses on “Global vs Local Variables – 2”. Q 1. Which of the following data structures is returned by the functions globals() and locals()?A. listB. setC. dictionaryD. tuple Show Answer Answer:-C. dictionary Explanation Both the functions, that is, globals() and locals() return value of the data structure dictionary.…