LEGB Lookup Skips to Enclosing

x = "global"

def outer():
    x = "enclosing"
    def inner():
        print(x)
    inner()

outer()

What does calling outer() print?

A

NameError

B

enclosing

C

global

D

local