[ create a new paste ] login | about

Link: http://codepad.org/5tRBiJKj    [ raw code | output | fork ]

Python, pasted on Dec 13:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Student:

    def __init__(self,name,email,contact,skills,ug=None,pg=None):

        self.email=email
        self.contact=contact
        self.name=name
        self.skills=[skills]

        self.edu={"ug":[ug],"pg":[pg]} 

james=Student("James","j@j.com","+1 7789990007","Python","CS", "CS")

print vars(james)


Output:
1
{'skills': ['Python'], 'contact': '+1 7789990007', 'email': 'j@j.com', 'edu': {'ug': ['CS'], 'pg': ['CS']}, 'name': 'James'}


Create a new paste based on this one


Comments: