SWhy to use global keywork in definition? As assignment considers variable as local to scope, we need to use global keywork to specify explicitly to use the external variable. https://docs.python.org/3/faq/programming.html#why-am-i-getting-an-unboundlocalerror-when-the-variable-has-a-valueComment·Article·Oct 2, 2021·JSON Schema Validator