Where are globals?

Report a typo

Which variables in the following code are considered global?

a = 1
b = 2

def func():
    c = 3
    d = a + b
    global e
    e = b + c
    f = 4
    def inner_func():
        nonlocal f
        f = 5
    inner_func()


func()

What are the ways to define a global variable?
Select one or more options from the list
___

Create a free account to access the full topic