python--Basic data types

Source: Internet
Author: User

Python basic data type ****************

1. Input and output
Print + ' string ... ' # #打印字符串
Raw_input the input content is a character type;
Input is a numeric type.

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/9B/D4/wKiom1lnfFLQfcavAACZnYRLXTo921.png "title=" 234520170713215641.png "alt=" Wkiom1lnfflqfcavaacznyrlxto921.png "/>
2. Variables
The ##-variable is an area in memory.
Name of the ##-variable: The variable name consists of letters, numbers, and underscores.

Program: # #其中hostname, Ip,user_year,cpu,memory,manager are variables

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/9B/D3/wKiom1lneG7g6lYGAAF5ocNL3bs242.png "style=" float : none; "title=" 234520170713213953.png "alt=" Wkiom1lneg7g6lygaaf5ocnl3bs242.png "/>

Test:

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9B/D3/wKiom1lneG-jbARCAAD-ipR1OO8542.png "style=" float : none; "title=" 234520170713214002.png "alt=" Wkiom1lneg-jbarcaad-ipr1oo8542.png "/>



3. Operators and expressions
1) arithmetic operator: +,-, *,**,/,%,//# #加, minus, multiply, power, divide, take,

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9B/D3/wKioL1lne1yRllvmAAB8Aplv7SQ843.png "style=" float : none; "title=" 234520170713214340.png "alt=" Wkiol1lne1yrllvmaab8aplv7sq843.png "/>

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/9B/D4/wKiom1lne13RDMUnAAHQFidOXGs061.png "style=" float : none; "title=" 234520170713214652.png "alt=" Wkiom1lne13rdmunaahqfidoxgs061.png "/>
Arithmetic of the program:

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/9B/D3/wKioL1lnfLSyN95rAAISSxpIt28295.png "title=" 234520170713215742.png "alt=" Wkiol1lnflsyn95raaissxpit28295.png "/>

From __future__ Import Division # #添加除法模块

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9B/D3/wKioL1lnfVPC_t6SAAHS1HG3lC8035.png "title=" 234520170713215854.png "alt=" Wkiol1lnfvpc_t6saahs1hg3lc8035.png "/>

2) assignment Operator: =, + =,-=,/=, *=,%=
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/9B/D3/wKioL1lne12jc1BRAAGsIa1-uMM223.png "style=" float : none; "title=" 234520170713214847.png "alt=" Wkiol1lne12jc1braagsia1-umm223.png "/>



3) relational operator: >=, <, <=,! =, = =


650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/9B/D4/wKiom1lne16gVvEqAAI7NdqYhVY900.png "style=" float : none; "title=" 234520170713215052.png "alt=" Wkiom1lne16gvveqaai7ndqyhvy900.png "/>

4) Logical operators: logical AND And, logical OR OR, logical not-not

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/9B/D3/wKioL1lne1-xywgjAAJpm1e3hPk845.png "style=" float : none; "title=" 234520170713215106.png "alt=" Wkiol1lne1-xywgjaajpm1e3hpk845.png "/>


4. Integral type

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/9B/D4/wKiom1lne2DwdGcwAAGq36MsFgA629.png "style=" float : none; "title=" 234520170713215129.png "alt=" Wkiom1lne2dwdgcwaagq36msfga629.png "/>
5. Long Plastic Surgery

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M02/9B/D4/wKiom1lne2Gh7DANAALxxlOgJ-M483.png "style=" float : none; "title=" 234520170713215145.png "alt=" Wkiom1lne2gh7danaalxxlogj-m483.png "/>

6. Floating-point type: decimal notation

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M02/9B/D3/wKioL1lne2Owac2qAALzKIcD2bk143.png "style=" float : none; "title=" 234520170713215215.png "alt=" Wkiol1lne2owac2qaalzkicd2bk143.png "/>
7. Plural type


650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/9B/D3/wKioL1lne3nCAi31AAH8wrWW744176.png "style=" float : none; "title=" 234520170713215223.png "alt=" Wkiol1lne3ncai31aah8wrww744176.png "/>

python--Basic data types

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.