{"id":1495,"date":"2023-05-21T08:29:03","date_gmt":"2023-05-21T08:29:03","guid":{"rendered":"https:\/\/itnotes.apjsoftwares.com\/?p=1495"},"modified":"2023-05-21T08:29:03","modified_gmt":"2023-05-21T08:29:03","slug":"give-example-of-python-constructors","status":"publish","type":"post","link":"https:\/\/itnotes.apjsoftwares.in\/index.php\/2023\/05\/21\/give-example-of-python-constructors\/","title":{"rendered":"Give example of Python constructors"},"content":{"rendered":"\n<p>Example of Python Constructors<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">class User:\n    name = \"\"\n\n    def __init__(self, name):\n        self.name = name\n\n    def sayHello(self):\n        print(\"Welcome to Guru99, \" + self.name)\n\nUser1 = User(\"Alex\")\nUser1.sayHello()<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Example of Python Constructors class User: name = &#8220;&#8221; def __init__(self, name): self.name = name&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[20],"tags":[],"_links":{"self":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1495"}],"collection":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/comments?post=1495"}],"version-history":[{"count":1,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1495\/revisions"}],"predecessor-version":[{"id":1496,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/posts\/1495\/revisions\/1496"}],"wp:attachment":[{"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/media?parent=1495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/categories?post=1495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itnotes.apjsoftwares.in\/index.php\/wp-json\/wp\/v2\/tags?post=1495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}