Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

creating a record in python

class Employee:
    pass

john = Employee()  # Create an empty employee record

# Fill the fields of the record
john.name = 'John Doe'
john.dept = 'computer lab'
john.salary = 1000
Source by docs.python.org #
 
PREVIOUS NEXT
Tagged: #creating #record #python
ADD COMMENT
Topic
Name
3+1 =