0

What is the difference between normal function calling and with self keyword function calling

26th Nov 2021, 11:27 AM
Naveen K
3 odpowiedzi
+ 3
Here is an example. Do you see the difference. There are two times a function "show_color(). One inside the object and one outside. And from inside the object both are called. https://code.sololearn.com/cKq7dvCc3s4T/?ref=app
26th Nov 2021, 11:56 AM
Coding Cat
Coding Cat - avatar
+ 2
Please tag the relevant programming language! Do you mean Python? A function with self as parameter is a method – it is a function of a class.
26th Nov 2021, 11:46 AM
Lisa
Lisa - avatar
0
Thank you I got my answer👍👍👍
26th Nov 2021, 12:03 PM
Naveen K