[Python] name student undefined in python for class creation

Discussão em 'Python' iniciado por Stack, Abril 27, 2025.

  1. Stack

    Stack Membro Participativo

    New to python. While running this script in python, I am getting an undefined name: student error. Below is my code. I tried solving this but failed.

    class Student:
    Std1 = Student()
    #std2 = Student()

    Std1.fname='Sushant'
    Std1.lname='Shinde'

    print(Std1.fname)

    Continue reading...

Compartilhe esta Página