Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1667750
  • 博文数量: 636
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 3950
  • 用 户 组: 普通用户
  • 注册时间: 2014-08-06 21:58
个人简介

博客是我工作的好帮手,遇到困难就来博客找资料

文章分类

全部博文(636)

文章存档

2024年(5)

2022年(2)

2021年(4)

2020年(40)

2019年(4)

2018年(78)

2017年(213)

2016年(41)

2015年(183)

2014年(66)

我的朋友

发布时间:2017-02-16 18:31:28

python里面默认的字符串都是ASCII编码,是string类型,ASCII编码处理中文字符是会出问题的。python的内部编码格式是unicode,在字符串前加‘u’前缀也可直接声明unicode字符串,如 u'hello'就是unicode类型。如果处理的字符串中出现非ascii码表示的字符,要想不出错,就得转成unicode编码了。具体的方法.........【阅读全文】

阅读(965) | 评论(0) | 转发(0)

发布时间:2017-02-16 14:28:43

很多新手刚开始学习python的时候经常会看到python 中__name__ = \'__main__\' 这样的代码,可能很多新手一开始学习的时候都比较疑惑,python 中__name__ = '__main__' 的作用,到底干嘛的?有句话经典的概括了这段代码的意义:“Make a script both importable and executable”意思就是说让你写的脚本模块既.........【阅读全文】

阅读(611) | 评论(0) | 转发(0)

发布时间:2017-02-16 11:29:33

#!/usr/bin/pythonnum1 = input("Please input a number:")num2 = input("Please input a number:")print num1 + num2print num1 - num2print num1 * num2print num1 / num2print "%s + %s =  %s" % (num1, num2, num1 + num2)print "%s - %s =  %s" % (num1, num2, num1 - num2)print "%s * %s =  .........【阅读全文】

阅读(1485) | 评论(0) | 转发(0)

发布时间:2017-02-15 18:35:24

#!/usr/bin/env python#-*-coding:utf-8-*-import osimport pandas as pdimport calendarimport datetimeimport MySQLdbimport os, sys, re,stringimport time, tarfile,getoptimport redisnum = open('num.txt','a')for i in range(1,101):    print.........【阅读全文】

阅读(735) | 评论(0) | 转发(0)

发布时间:2017-02-14 14:40:22

在网络技术中,端口(Port)包括逻辑端口和物理端口两种类型。物理端口指的是物理存在的端口,如ADSL Modem、集线器、交换机、路由器上用 于连接其他网络设备的接口,如RJ-45端口、SC端口等等。逻辑端口是指逻辑意义上用于区分服务的端口,如TCP/IP协议中的服务端口,端口号的范围从0到65535,比如用于浏览网页服务的80端.........【阅读全文】

阅读(3399) | 评论(0) | 转发(1)
给主人留下些什么吧!~~

onlyword2018-01-30 15:35

博主python玩的很溜啊,貌似有很多有用的东西,感谢分享!

回复  |  举报
留言热议
请登录后留言。

登录 注册