Pyhton
eben86
lol
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Python Basic
1. swap two elements a, b = b, a #fk, it is so easy. 2. Chained Logical a same with: a #lol, I love python, easy easy and easy 3. Indexing a sequence原创 2008-09-15 11:31:00 · 466 阅读 · 0 评论 -
Python基础(1) - Numbers and Expressions
1. 基本运算,如下: 基本运算不做过多解释. >>>1+23>>>5-14>>>1/20>>>1.0/2.00.5>>>1/2.00.5>>>2.0*24.02. Python Divstion需要加入代码: from __future__ import division原创 2008-09-15 12:40:00 · 637 阅读 · 0 评论 -
Python基础 (2) - 输入读入input, raw_input
>>> input ("my age is : ")my age is :2323 >>> raw_input("my age is : ")my age is : 2323 有什么不一样?再看一个例子 >>> age = input(" how old r u ?") how old r u ?23>原创 2008-09-15 12:54:00 · 3994 阅读 · 0 评论 -
Python基础 (3) - String, Long String, Raw String
我喜欢用例子说明,语文不是很好-_-,直接看code吧 长String,可以用 .......来定义,或者"""......""" >>> print This is really a long Sting,I want to playbut I have no timepython is good,show a "hello world"en原创 2008-09-15 13:10:00 · 1433 阅读 · 0 评论 -
Django中文显示问题
最近刚刚踏入python+django阵营,正在学习limodou的django step by step.其中第三章里面的templete中,用utf-8编码之后依然不能显示中文,灰常纳闷.甚至在templete文件(list.html)中加入也不管用网上看到说在settings.py里面更改为GB格式的中文编码,我没试过,因为我觉得不管怎样还是utf格式比较标准.找了半天解决办法也没找到,自己原创 2008-09-25 23:32:00 · 2442 阅读 · 3 评论
分享