def saver()saver append( print(saver xsaver [saver([ saver([ saver([ the function name is global to the function itselfbut it need not be declared because it isn' changed directly within the function this isn' used in exactly the same waybut when coded like thisthe attachment of an object to the function is much more explicit (and arguably less magicalfunctions without returns in python functionsreturn (and yieldstatements are optional when function doesn' return value explicitlythe function exits when control falls off the end of the function body technicallyall functions return valueif you don' provide return statementyour function returns the none object automaticallydef proc( )print(xno return is none return proc('testing 'testing print(xnone functions such as this without return are python' equivalent of what are called "proceduresin some languages they're usually invoked as statementsand the none results are ignoredas they do their business without computing useful result this is worth knowingbecause python won' tell you if you try to use the result of function that doesn' return one as we noted in for instanceassigning the result of list append method won' raise an errorbut you'll get back nonenot the modified listlist [ list list append( print(listnone append is "procedureappend changes list in place ' section "common coding gotchason page discusses this more broadly in generalany functions that do their business as side effect are usually designed to be run as statementsnot expressions the benchmarking interlude