Python Full stack Development study notes-03. The Third day

Source: Internet
Author: User
Tags shallow copy

Set

Define set ([1,2,3,4])

{1,2,3,4}

Key values are not repeatable

Ternary operators
if Else value2

Depth copy
Import"123"# shallow copy  # deep copy 

Summarize:

1. The depth copy does not copy the STR and the numbers, using the same area of memory.

2. For list, dict,tuple copy, shallow copy only copy first layer. Deep copy copies all layers, and the last layer does not copy when it encounters a string or a number.

Function programming

Python Full stack Development study notes-03. The Third day

Related Article

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.