Which function is ran when an object is instantiated?

The function is called init. This is the constructor, which is used to initiate the attributes of the object and allows arguments to be passed upon instantiation.

Answered by Kelvin C. Python tutor

984 Views

See similar Python Mentoring tutors

Related Python Mentoring answers

All answers ▸

What's the difference between a local and a global variable?


h


Sort a given input of lowercase letters alphabetically


Using the shared code editor, write a recursive function for calculating a factorial of an input parameter.


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2024

Terms & Conditions|Privacy Policy