Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
PyNewInit
#python 3.6.9 #PyNewInit #this code is created by Rezaul Hoque on January 23,2022; #contact: jewelmrh@yahoo.com,Dhaka, Bangladesh #note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; class Garden: def __new__(cls, garden, location): # create a new object obj = super().__new__(cls) # initialize attributes obj.garden = garden obj.location = location # inject new attribute obj.garden = f'{garden}' return obj g = Garden('Garden', 'Backyard') print(g.garden) print(g.__dict__)
run
|
edit
|
history
|
help
0
15
InsertionSort
IP Networks splitting calculator
Moore Voting Algorithm
List comprehension, join, split, zip
restraunt score
Magic Calendar of any month
Variables.py
My cousin asked for this will never forgive her
31 dec dil khush