如何打印我班上的全部对象? (蟒蛇)

时间:2018-11-20 14:32:29

标签: python

class sensor():
    def __init__(self, locationID, tempValue, humiLvl):
        self.locationID = locationID
        self.tempValue = tempValue
        self.humiLvl = humiLvl

sensor1 = sensor(1, 25.5, 36)
sensor2 = sensor(2, 27.5, 24)

print()    <<< ?

0 个答案:

没有答案