MCQs > IT & Programming > Python > Which is the correct method for changing a global variable inside a function?

Python MCQs

Which of the following is the correct method for changing a global variable inside a function?

Answer

Correct Answer: def change_globvar(): global globvar globvar = 1

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Python Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it