Python Learning Note 12 (sequence some method summary)

Source: Internet
Author: User

1. String judgments

Str.isalnum () returns: True, all letters or numbers

Str.isalpha () returns: True, all letters

Str.isdigit () returns: True, all numbers

Str.istitle () returns: True, the first letter is uppercase

Str.isspace () returns: True, all spaces

Str.islower () returns: True, all lowercase letters

Str.isupper () returns: True, all uppercase

2. Table

L.extend (list2) Add all elements of table list2 at the end of table L

L.append (x) append x element at the end of L

L.sort () sort the elements in L

L.reverse () reverse the elements in L

L.pop () returns: the last element of table L, and deletes the element in table L

Del L[i] Delete the element

(All of these methods are performed on the original table, and will have an effect on the original table instead of returning a new table.) )

Python Learning Note 12 (sequence some method summary)

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.