append

Sick Monkey sickcodemonkey at gmail.com
Thu May 10 13:11:05 EDT 2007


http://docs.python.org/tut/node7.html

Yes there is a pop function.

"An example that uses most of the list methods:

>>> a = [66.25, 333, 333, 1, 1234.5]
>>> print a.count(333), a.count(66.25), a.count('x')
2 1 0
>>> a.insert(2, -1)
>>> a.append(333)
>>> a
[66.25, 333, -1, 333, 1, 1234.5, 333]
>>> a.index(333)
1
>>> a.remove(333)
>>> a
[66.25, -1, 333, 1, 1234.5, 333]
>>> a.reverse()
>>> a
[333, 1234.5, 1, 333, -1, 66.25]
>>> a.sort()
>>> a
[-1, 1, 66.25, 333, 333, 1234.5]

"


On 10 May 2007 10:02:26 -0700, HMS Surprise <john at datavoiceint.com> wrote:
>
> Trying not to be a whiner but I sure have trouble finding syntax in
> the reference material. I want to know about list operations such as
> append. Is there a pop type function? I looked in tutorial, language
> reference, and lib for list, append, sequence. Is there a place where
> us doofi ( who may not have our heads out in the sunlight) may find
> all related syntax grouped together?
>
> thanx,
>
> jh
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070510/bceb7e84/attachment.html>


More information about the Python-list mailing list