54893/can-you-explain-what-is-the-use-init-and-self-in-python
Hi,
I used this code so many times
def method(self, abc): def __init__(): .... ....
But I don't have the clear idea about _init_ and self.
Can You please explain that?
Thank you,
The basic difference between these two are
self
class ABC:
def _init_(self, x , y):
self._x = x
self._y = y
Hi, @Roshni, It is a Floor Divisionoperator, which ...READ MORE
Hey, all the tools that you have ...READ MORE
can you an example for each? READ MORE
Ruby and Python are actually very different languages (although ...READ MORE
suppose you have a string with a ...READ MORE
You can also use the random library's ...READ MORE
Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE
Enumerate() method adds a counter to an ...READ MORE
print(pow(3,4)) #this will return the exponentiation of 3 ...READ MORE
There are certain rules that we have ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.