मराठी
तामिळनाडू बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान इयत्ता १२

Write the basic rules for a global keyword in python. - Computer Science

Advertisements
Advertisements

प्रश्न

Write the basic rules for a global keyword in python.

टीपा लिहा

उत्तर

The basic rules for the global keywords in Python are:

  1. When we define a variable outside a function, it’s global by default. You don’t have to use global keywords.
  2. We use a global keyword to read and write a global variable inside a function.
  3. Use of global keywords outside a function has no effect.
shaalaa.com
Variable Scope
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 7: Python functions - Evaluation [पृष्ठ ११३]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 12 TN Board
पाठ 7 Python functions
Evaluation | Q 2. | पृष्ठ ११३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×