On Jul 7, 1:45 am, ssecorp <[EMAIL PROTECTED]> wrote:
> >>> h = "aja baja"
# 'aja baja' is created and assigned to the name h

> >>> h += 'e'
# Is the equivalent of:
# h = h + 'e'
#
# In there, a h and 'e' is concatenated and assigned to
# a new string object which is bound to h. The
# original string object which contains
# 'aja baja' is "garbage collected"[1].

> >>> h

# printing h which contains the new string object containing 'aja
bajae'

> 'aja bajae'

[1] actually python uses reference counting first to choose which
object to delete
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to