Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
super and overriding
#python 3.5.2 class tsec: no_of_dept=3 __no_ofstud=600 def __init__(self): self.no_of_dept="majnu bhai ke haath me" self.no_ofproff="special" class chemi(tsec): pass no_of_dept=6 def __init__(self): self.no_of_dept="uday bhai ke haath me" self.no_ofproff="koi nai hai be" super().__init__() chem=chemi() class comps(chemi): comps_proff=["desi","videshi","meena","saleena"] cm=comps() print(cm.no_of_dept) print(cm._tsec__no_ofstud) print(cm.no_of_dept) print(chem.no_ofproff) print(cm.comps_proff) print(chem.no_of_dept) print(tsec.no_of_dept)
run
|
edit
|
history
|
help
0
Guessing game
abstract base class
Test
Lesson#6
Converion of dictionary to list of tuples (Stackoverflow problem)
Algorytm szybkiego potęgowania
Hr
linearSearch.py
functions add
2.1.19