def say_boo_twice(): global boo boo = \'Boo!\' print boo, boo boo = \'boo boo\' say_boo_twice()
The output is
Boo! Bo
You are re-assigning boo after you declare it as global, so the value is the last one you assigned to it. If you removed line three, you would get the output you expect.