码迷,mamicode.com
首页 > 编程语言 > 详细

Python 9 类 与 类方法(类的操作)

时间:2017-05-07 18:41:12      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:bsp   输出   方法   strip()   包含   python   strip   操作   nbsp   

 

 

 

str类方法(操作):

name = "abcdefg"

去除字符串首尾的空格.strip()

 

 

int类方法(操作):

age = 18

 

bool类方法(操作):包含int所有操作,但主要是输出True  和False

Python 9 类 与 类方法(类的操作)

标签:bsp   输出   方法   strip()   包含   python   strip   操作   nbsp   

原文地址:http://www.cnblogs.com/arminz/p/6821359.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!