Jump to content

Svetlana

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Svetlana

  1. There's no enough explanation to the variables used in the tutorials.  For example, what is "self"?  Is it an object or just a parameter?

    class Person:
      def __init__(self, name, age):
        self.name = name
        self.age = age

    p1 = Person("John", 36)

    print(p1.name)
    print(p1.age)

×
×
  • Create New...