<filename>02_oop/01_classes_and_objects/06_class_methods.py
# Class methods are accessed using the class name and can be accessed without creating a class object.
class Player:
  teamName = 'Liverpool'  # class variables

  def __init__(self, name):
    self.name = name  # creating instance variables

  def a(self):
    pass

  @classmethod
  def getTeamName(cls):
    cls.a()
    return cls.teamName


print(Player.getTeamName())

<filename>02_oop/01_classes_and_objects/06_class_methods.py
# Class methods are accessed using the class name and can be accessed without creating a class object.
class Player:
  teamName = 'Liverpool'  # class variables

  def __init__(self, name):
    self.name = name  # creating instance variables

  def a(self):
    pass

  @classmethod
  def getTeamName(cls):
    cls.a()
    return cls.teamName


print(Player.getTeamName())

# Class methods are accessed using the class name and can be accessed without creating a class object. # class variables # creating instance variables