博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Python note
阅读量:5878 次
发布时间:2019-06-19

本文共 944 字,大约阅读时间需要 3 分钟。

the blog is really fantistic http://www.cnblogs.com/taowen/articles/11239.aspx

After hours of study, I think it's need to keep a note.

1. when u want to add in a list, u should should use append, and u should know the mechanisation. list.append(a) mean link the address of a, so when the a is modified, the element in list changed accordingly.

2. list can contain the various structs, likes list = [1, 2, {'hello', 'world'}]

3.   print 1, "a" + "1"    1 a1

  print 1, "a" , "1"     1 a 1
  print i + "a" , "1"     error

4. turple is read_only, it's the difference between the list

5. xxx = file('c:\\a.txt', 'r') or xxx = file('c:/a.txt', 'r')

6. the python to exe, we should write the setup.py

#setupfrom distutils.core import setupimport py2exesetup(console=["hello.py"])

then u can type "python setup.py py2exe" in dos window

7. when u want to completion, u can use the key "Ctrl + /"

转载于:https://www.cnblogs.com/chuanlong/archive/2013/05/04/3060209.html

你可能感兴趣的文章
Highcharts使用表格数据绘制图表
查看>>
Thinkphp5笔记三:创建基类
查看>>
hdu5373
查看>>
4.单链表的创建和建立
查看>>
Android 好看的搜索界面,大赞Animation
查看>>
查询反模式 - GroupBy、HAVING的理解
查看>>
上班族的坐姿
查看>>
ubuntu 12.04 下面安装vmware workstation 8.0.4
查看>>
[原创]FineUI秘密花园(二十三) — 树控件概述
查看>>
【Java学习笔记】如何写一个简单的Web Service
查看>>
如何解决This system is not registered with RHN.
查看>>
Cocos2d-x学习笔记(两)Cocos2d-x总体框架
查看>>
拆解探索MagSafe电源接口结构和指示灯变颜色原理
查看>>
Android中EditText,Button等控件的设置
查看>>
lintcode:Remove Nth Node From End of Lis 删除链表中倒数第n个节点
查看>>
POJ 1915-Knight Moves (单向BFS && 双向BFS 比)
查看>>
linux编译安装LAMP
查看>>
php中的continue用法
查看>>
Android小游戏应用---撕破美女衣服游戏
查看>>
TextKit简单示例
查看>>