Marco Mariani wrote: > Ricardo Aráoz ha scritto: > >> L = ['one', 'two', 'three', 'four', 'five'] >> >> print L[0] # This would be 'head' >> print L[1:] # This would be 'tail' >> >> Caution : L[0] and L[1:] are COPIES of the head and tail of the list. > > This might surprise people who see L[1:] = [], since changing a copy is > not supposed to change the original. >
Sorry, should have written RETURN copies instead of ARE copies. -- http://mail.python.org/mailman/listinfo/python-list