摘要: 1 package main //main函数 2 import "fmt" //相当于#include 3 func main() { 4 ar := [10]int{9, 8, 6, 4, 2, 7, 1, 3, 0, 5} 5 num := len(ar) //... 阅读全文
posted @ 2014-05-15 21:10 ConCho 阅读(2483) 评论(1) 推荐(1)
摘要: 文档如下:# name, age, scoretom, 12, 86Lee, 15, 99Lucy, 11, 58Joseph, 19, 56第一栏为姓名(name),第二栏为年纪(age),第三栏为得分(score)现在,写一个Python程序,1)读取文件2)打印如下结果:得分低于60的人都有谁... 阅读全文
posted @ 2014-05-14 00:20 ConCho 阅读(1588) 评论(0) 推荐(0)
摘要: 基本定制型C.__init__(self[, arg1, ...]) 构造器(带一些可选的参数)C.__new__(self[, arg1, ...]) 构造器(带一些可选的参数);通常用在设置不变数据类型的子类。C.__del__(self) 解构器C.__str__(self) 可打印的字符输出... 阅读全文
posted @ 2014-05-13 23:45 ConCho 阅读(4375) 评论(2) 推荐(1)
摘要: 本文 为博主看了 vamei 的blog 写下的随笔 . 致敬Vamei1.type() 可以显示参数的类型 如 : a=12 type(a) 为 int2.python的基本类型 为 int float bool string 如 int : i=1 , float : f=12.5 ,... 阅读全文
posted @ 2014-05-13 02:48 ConCho 阅读(570) 评论(1) 推荐(0)