随笔分类 - Python
摘要:路径和文件名不要有中文 #!/usr/bin/env python #-*- coding:utf-8 -*- 2.7需要加此行。3.5不用 版本区别: python3.5 print('hello,world') 默认utf-8 input("请输入名字") utf-8转换gbk: decode(
阅读全文
摘要:字符串是一个类,"hello world"是它的对象 常用方法: 移除空白 分割 长度 索引 切片 class str(basestring): def capitalize(self): """ 首字母变大写 """ (返回副本) def center(self, width, fillchar=
阅读全文

浙公网安备 33010602011771号