Skip to main content
edited title
Link
dda
  • 6.2k
  • 2
  • 28
  • 37

What does thisdo these two x'x' mean in this Python code: self.x = x?

deleted 1 characters in body
Source Link
dda
  • 6.2k
  • 2
  • 28
  • 37

I'm confused in bellowing code:

class Point():
    def __init__(self, x=0, y=0):
        self.x = x
        self.y = y

I do not understand what those two x in code self.x = x meansmean.

I'm confused in bellowing code:

class Point():
    def __init__(self, x=0, y=0):
        self.x = x
        self.y = y

I do not understand what those two x in code self.x = x means.

I'm confused in bellowing code:

class Point():
    def __init__(self, x=0, y=0):
        self.x = x
        self.y = y

I do not understand what those two x in code self.x = x mean.

Source Link
stardiviner
  • 1.1k
  • 3
  • 23
  • 35

What does this two x mean in this Python code self.x = x?

I'm confused in bellowing code:

class Point():
    def __init__(self, x=0, y=0):
        self.x = x
        self.y = y

I do not understand what those two x in code self.x = x means.