Python list count and insert instance _python

Source: Internet
Author: User
Tags python list

This example describes the Python list count and the use of inserts. Share to everyone for your reference. Specifically as follows:

Copy Code code as follows:
Word=[' A ', ' B ', ' C ', ' d ', ' e ', ' f ', ' G ']//the first element of the element 0,word[0]=a
A=[NUM1:NUM2]
Elements from NUM1 to num2 (excluding element num2)
If the number is negative, it represents the penultimate


Append append, Word.append (elements) when the list is being manipulated
Elements is independent, if the list is appended to Word as a whole, instead of extending word,
Word.extend (elements) is an extension that extends the elements contained elements to the back of Word insert () and inserts:
Copy Code code as follows:
Word.Insert (mum,elements)

The insertion is also a whole.

I hope this article will help you with your Python programming.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.