Home > Backend Development > Python Tutorial > Are python collections mutable?

Are python collections mutable?

silencement
Release: 2019-05-23 09:20:55
Original
5588 people have browsed it

Are python collections mutable?

A set is an unordered sequence of non-repeating elements. Python collections include mutable collections and immutable collections.

You can use curly brackets { } or the set() function to create a set. Note: To create an empty set, you must use set() instead of { }, because { } is used to create an empty dictionary.

Creation format:

Are python collections mutable?

The following is an example of demonstration

Are python collections mutable?

Are python collections mutable?

The above is the detailed content of Are python collections mutable?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template