输出对象属性,输出对象,class SayMyN
输出对象属性,输出对象,class SayMyN
class SayMyName: def __init__(self, myname): self.myname = myname def say(self): print 'Hello, my name is', self.mynamename1 = SayMyName('A')name1.say()
相关内容
- python实现ftp传输,pythonftp传输,import ftpli
- 获得web页面信息,获得web页面,import sys,
- 获得web页面信息,获得web页面,import sys,
- 获得进程的执行路径和import path,importpath,import os, s
- Python获得系统属性和系统时间,python获得系统属性,im
- python继承父类示例,python继承示例,import mathc
- python获得进程号和进程的参数信息,python获得进程参数
- Inherited method,inheritedmethod,class FirstC
- Use Inheritance to add more features to a class,,class Car :
- Python模拟http get,python模拟get,import sys,
评论关闭