Python Basic data type

Source: Internet
Author: User

Python Basic Number Type

Python System installation Methods

    • Variable

Describe all the values that can be changed


Name= ' Jin '
variable name name  assignment symbol '= '  value (values) ' Jin '

#变量的三个特性:
ID Type Values

#使用实例:
Print (ID (name))
Print (Type (name))
Print (name)

    • Data type

  

String Type  str  is used to denote the name of the hobby descriptive thing with the STR string    type representing the number type int the     salary age and so on figure with int denotes floating point type       float height and weight coordinates, etc. exact numbers need to be represented by floating-point

#实例:
X= ' Jin '
Print (type (x)) #打印出x是什么类型 str
X=8
Print (type (x)) #x to int

#注意
string-character str number converted to int type

Cases:
x= ' 666 ' #此时x for str type
int (x) #此时x to int type value 666 instead of ' 666 '

------day1   10 list Dictionary-----------------------------------------------

Python Basic data type

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.