x = 5
y = 8
def main (): #her defineres "main" funksjonen, denne inneholder "swap" og 
             # "printglobals" funksjonen
    x = 7
    y = 3
    print ("i main :", x, y)
    swap (x,y)
    print ("i main :", x, y)
    printglobals ()
    print ("i main :", x, y)
def swap (x, y): # her defineres "swap" funksjonen
    x,y = y,x # Python triks for å bytte om to variabler .
    print (" ---> i swap :", x, y)
def printglobals (): #her defineres "printglobals" funksjonen
    print (" ---> i printglobals :", x, y)
main () # her kjøres "main" funksjonen
