A byte of Python (excerpt 01)

Source: Internet
Author: User

A byte of Python the first chapter introduces

Python Features

简单、易学、免费、开源  高层语言、可移植性、解释性   面向对象、可扩展性、可嵌入性    丰富的库
Chapter II Installation of Python

Http://jingyan.baidu.com/article/7908e85c78c743af491ad261.html

Chapter III Basic Concepts
数 -- 整数、长整数、浮点数和复数字符串 --字符的序列    单引号、双引号、三引号    转义符    自然字符串    (如果你想要指示某些不需要特别处理的字符串,如转义符,那么你需要指定一个自然字符串。自然字符串通过给字符串加上前缀 r 或 R 来指定。例如 r"Newlines are indicated by \n" 。)    Unicode字符串    (例如, u"This is a Unicode string." 。)    字符串是不可变的    按字面意义级连字符串(例如, ‘What\‘s‘ ‘your name?‘ 会被自动转为 "What‘s your name?" 。)变量标识符命名    标识符的第一个字符必须是字母表中的字母(大写或小写)或者一个下划线(‘ _ ‘)。       标识符名称的其他部分可以由字母(大写或小写)、下划线(‘_ ‘)或数字(0-9)组成。    标识符名称是对大小写敏感的。数据类型    变量可以处理不同类型的值,称为数据类型。基本的类型是数和字符串对象    记住,Python把在程序中用到的任何东西都称为对象。就每一个东西包括数、字符串甚至函数都是对象这一点来说,Python是极其完全地面向对象的。逻辑行和物理行    下面是一个在多个物理行中写一个逻辑行的例子。它被称为明确的行连接。    s = ‘This is a string.     This continues the string.‘    print s    This is a string. This continues the string.    在逻辑行中使用了圆括号、方括号或波形括号的时候,可以使你不需要使用反斜杠。这被称为暗示的行连接。缩进    在逻辑行首的空白(空格和制表符)用来决定逻辑行的缩进层次,从而用来决定语句的分组。

A byte of Python (excerpt 01)

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.