Python Programming: TUPLE Data Type

1. What is TUPLE?

Tuple is similar to the list, the difference is that the elements of the tuple cannot be modified, so using tuple can make the code more secure. The tuple uses small brackets, lists the square brackets. TUPLE and LIST can index, slice, while tuple is also an unity list.

2. How to create tuple?

The tuple creation is very simple, only need to add an element in parentheses and use a comma. Let’s create a tuple in several different ways.

TUPLE1=# Create an empty group

Tuple2=(1,) # 不 加加, tuple2 type is integer

TUPLE3=(‘tony’, ‘Tom’, 33, 55) # 元组 can also be different types of data

Tuple4="Hello", "Good", "better", "best" # No need to be brackets

Type (x) uses this built-in method to determine what type of data current X is

3. How do I access the value in Tuple?

TUPLE3 [-1] indicates reverse reading, reading a countdown first element

Tuple3 [0: -2] indicates that reading from the first element to the second element

4. How to modify the value in the TUPLE?

The element value in the tuple is not allowed, but we can get a new TUPLE to achieve the purpose of modifying by intercepting the reputation.

Tuple7 [0]="hi" # This modification is not allowed

Del tuple7 [0] # This deletion is also not allowed.

Del tuple7 # This type of deletion does not exist after taking operation.

5. What are the operators of the TUPLE?

This section is the same as the List of the previous chapter.

6. What are the common built-in functions ofTUPLE?

The TUPLE built-in function is the same as the List, and is only part.

Note: The tuple method can convert a list into a tuple type, see the tuple8 tuple in the figure.

Summary: Today, the definition characteristics of TUPLE this type of data are mainly told and the difference between the difference, creation, value, update deletion, the use of operators, and the simple use of commonly used functions.

[Video] Capture Guangdong Intelligent Institute, academician of the Chinese Academy of Sciences reveals "brain science"

Wen, Figure, video / Yangcheng Evening News full media reporter He Ben

Intern Liu Ying

On November 28th, "Tongxin Guang and Macau and Dawang District" network theme activity media rises in Zhuhai, "Treasure Hunt", explore the Guangdong Intelligent Science and Technology Research Institute of Hengqin High-tech R & D Park (hereinafter referred to as "smart hospital" .

As an important scientific and technological guarantee for the important starting of artificial intelligent industrial ecotropic circles and Hengqin Guangdong, Hong Kong and Macao, the intelligent hospital exhibited an important role in the "Guangzhu Australian Technology Innovation Corridor".

First generation machine head

The world’s first U m R 5T high field system magnetic resonance imaging system

Academician of the Chinese Academy of Sciences, Zhang Xu, Dean of the Guangdong Intelligent Science and Technology Research Institute, introduced that the primary task of the smart house is to carry out "brain science" research.

Human can do, learn, think, speech, etc., attributed to the magical and precise brain. In Zhang Xu, "Brain Science" is the crown in scientific research, combining the research results of "brain science" and artificial intelligence play an important role in social development, especially for emerging technology development. force.

Academician of the Chinese Academy of Sciences, Zhang Xu (right), Dean of the Guangdong Intelligent Science and Technology Research Institute, received a reporter interview

It is understood that six major research centers in the intelligent hospital, undertake forward-looking basic research and key core technology research, including intelligent information network technology research centers, cerebral computing system research centers, Wanwei Titra Research Center, Class Brain Model Research Center, recognition Knowing the Neural Network Research Center, the Financial Industrial and Commercial Research Center, etc., the cerebral model research center is committed to changing the powerful AI in science fiction into reality.

Researcher in anatomy mouse

Zhang Xu revealed that the current intelligent hospital has a number of technologies worldwide, and the future will make full use of Macao strategic status advantages, and focus on the high-level talent team and high-end technology innovation resources, and build the International Science and Technology Center of Guangdong, Hong Kong, Macau. Two corridor "strategic supported important science and technology platforms.

Breaking the tradition, introducing a smart display, bringing you a wonderful life

Traditional shop advertising not only is not only logistics cost, and labor costs and technical costs are difficult to estimate, and the advertising effects of traditional models are also small. "Figure" is to break the imprisonment of traditional advertising thinking, helping merchants can achieve high-efficiency promotion targets for exposure and traffic guarantee on the basis of great reduction of promotional costs. "Figure to" project passes the "map to X1 box" coverage free laying makes the project’s extensive promotion, and its advertising screen is set in the gate of the Lujie shopping shop or the intensive space in the mall, and there is no more than 20 distances. Rice, firmly lock the shopping crowd, the explosive proof effect makes the customer are unforgettable. However, the premise of free laying is that there is one-third of the advertising screen, which is one of the important means of traffic change. When the business district of the city traffic center is "mapped" full coverage, then the immersion surrounding surrounding surrounding surrounding surrounding of the outlet can make the advertiser to achieve a full-scale exposure. This is the digital propaganda scene that "map". empire.

Holistic yoga practices to regularise hormonal health

The combination of proper diet, regular exercise, and positive thoughts can make a lot of difference to one’s life, experts suggest. Taking it a step ahead, fitness influencer Juhi Kapoor shared certain yogic practices to regularise hormonal health.

“Regulation of hormonal balance is not just one tablet solution. Your approach needs to be holistic in terms of nutrition, workout, and positivity,” she shared on her Instagram page, Fitness Fables.

Anuloma Viloma can help to achieve balance throughout your body. It will detoxify your system and also keep you composed, improve functioning of organs, and aid better production of hormones