Summary about Frozenset attention Point

Source: Internet
Author: User
Tags pear
Set: A set of different elements that form a collection, which is the basic data type of Python. Collection classification: Variable set (set), immutable set (Frozenset), created in the same set of features: unordered, unique, fast 1. Create collection >>> s =set (' Ian ') >>> s{' A ', ' n ', ' I '} >>> Len (s) 3>>> Li =[' apple ', ' pear ', ' peach ']>>> s =set (li) >>> s{' peach ', ' pear ', ' Apple '}>>> Len (s) 3 2. Access the collection because the collection itself is unordered, it cannot be a collection

1. Python Basic content: Collections

Summary: Set: Sets different elements together to form a set, which is the basic data type of Python. Collection classification: Variable set (set), immutable set (Frozenset), created in the same set of features: unordered, unique, fast 1. Create collection >>> s =set (' Ian ') >>> s{' A ', ' n ', ' I '} >>> Len (s) 3>>> Li =[' apple ', ' pear ', ' peach ']>>> s =set (LI) >>> s

2. Detailed introduction to Python's built-in Frozenset functions

Introduction: This article explains in detail the Python built-in frozenset function

3. Python Core Data type introduction

Introduction: Overview Numbers: Int,long,float,complex,bool characters: Str,unicode list: Lists dictionary: dict tuples: Tuple files: File Other types: Collection (set), Frozenset, class type, None other file class tools: Pipe (Pipes), FIFO (FIFOs), ...

4. Python built-in function--set&frozenset

Summary: Python built-in function--set&frozenset sample code There is a need to refer to the following

"Related question and answer recommendation":

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.