如何从python中的子类中的父类获取值

时间:2018-02-23 04:57:26

标签: python-3.x inheritance

我想访问子类

中的val值
class a(object):
    val=[]
    def func1():
        val=['cat','dog']
        print(val)

class b(a):
    #how to get the value of variable val   

0 个答案:

没有答案
相关问题