SyntaxWarning in Python

Python Methods and Functions

Warning about the use of questionable syntax.

The category is used when probable syntax errors are noticed.

  var =' a' 

def update_global ():
# Here, the binding of a value named var
# occurs before indicating that it is global.
var = 'b'
global var

update_global () # SyntaxWarning

Get Solution for free from DataCamp guru