20240418 Object; Class

Run Settings
LanguagePython
Language Version
Run Command
class Toy: name = 'mickey' def __init__(self, age): self.age = age def greet(self): print("hello") mic = Toy(30) mic2 = Toy(40) print(mic.__dict__) print(mic.name, mic.age) mic.greet() mic.age = 40 mic.name = "Ryan" print(mic.name) print(mic.name, mic.age) del mic.name # can't delete pre-build variable print(mic.name) """del mic.name ## can't print(mic.name) del mic.age ## can delete runtime variable print(mic.age)"""
Editor Settings
Theme
Key bindings
Full width
Lines