# Author: James Tam # Version: March 6, 2010 # Learning concepts: pass by reference (passing a reference to a # list). # In function fun another local reference refers to the original list in main. # Since this copy refers to the original list changes made via the local reference # will change the original list. def fun(list): list[0] = 99 print(list) def main(): list = [1,2,3] print(list) fun(list) print(list) main()