Q .In the following code, which variables are in the same scope?


def func1():

    a = 1

    b = 2

def func2():

    c = 3

    d = 4

e = 5


Answer =

Here a, b, c, d are in same scope i.e. local scope. 

5 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post