亲爱的程小妮  

dir()显示类的所有的成员

name="chenghuimin"

print(type(name))

print(dir(name))

str、list、tuple、dict???

contains、format(字符串拼接,与%s实现效果一样)、center、count、encode、endswith

关于输出中文为乱码情况的处理:

在编写 代码时前加:# -*- coding:utf-8 -*-

在file>settings>file encodings 中将编码翻方式全部改为utf-8

posted on 2017-11-27 21:03  亲爱的程小妮  阅读(89)  评论(0)    收藏  举报