码迷,mamicode.com
首页 > 编程语言 > 详细

Python001

时间:2016-09-18 21:55:36      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:

Learning python for living.

Success is finding satisfaction in giving a little more than you take.

                                                                                      -----Someone

 

During  total postgraduate new  term, purpose of learning a skillful computer  language like python ,I thought,is more important and significant for the future career . So,I make my strong-willed decision on learning python for this necessary condition. 

Making simple, Let‘s do it.

Introduction

技术分享

 

 the edition of 2.6~2.7 是到3.+过度性质的。

技术分享

 

#!/usr/bin/env python.  启用python的环境变量,调用语言编译器。

 

 

变量and 赋值:

变量:赋值传参,动态调用。

 

给变量起名字的原则:

1, 名字要通俗易懂。

2, 长名字要用_隔开。

3, 长名字单词首字母大写 (驼峰写法)

4, “_”,  ”数字“  ,  ”字母“   才是命名的正确选择(合法),其他都是错误。

5, 不合法命名:数字不能开头;特殊字符不能有;空格不能有;某些关键字不能声明为变量。

 

 

看内存地址: id()是内置函数,最好不要当作变量。(不是物理内存地址,改地址是python自己划定的空间内存地址)

 技术分享

解释:

技术分享

 

 

用户交互: 

技术分享

技术分享

 

 

 

 

 

Python001

标签:

原文地址:http://www.cnblogs.com/johnhudianyi/p/5882394.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!