On Fri, 2 Dec 2005, Amit Aronovitch wrote:

> Meta
> ====
> In this essay I'll try to clearly state some of my ideas about variables in
> python and how to teach the subject to students new to programming.

lets cut the long talks. in order for me to understand what you're trying
to do, i would like you to explain the following scenarios using the
terms you're suggesting:

Scenario 1:
   >>> list1 = [2, 3]
   >>> list1[0] = 1
   >>> print list1
   [1, 3]

Scenario 2:
   >>> a = 1; b = 2; c = 3
   >>> list1 = [a, b, c]
   >>> list2 = [b, c]
   >>> print list1
   [1, 2, 3]
   >>> print list2
   [2, 3]

Scenario 3:
   >>> list1 = [1, 2]
   >>> list2 = [3, 4]
   >>> mlist_a = [list1, list2]
   >>> print mlist_a
   [[1, 2], [3, 4]]
   >>> mlist_a[1] = list1
   >>> print mlist_a
   [[1, 2], [1, 2]]


-- 
guy

"For world domination - press 1,
 or dial 0, and please hold, for the creator." -- nob o. dy

לענות