Skip to content

Commit 0694f47

Browse files
Add files via upload
1 parent 5c0c05a commit 0694f47

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Class Example 1.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class Person:
2+
"This is a person class"
3+
age = 10
4+
5+
def greet(self):
6+
print('Hello')
7+
8+
9+
# Output: 10
10+
print(Person.age)
11+
12+
# Output: <function Person.greet>
13+
print(Person.greet)
14+
15+
# Output: 'This is my second class'
16+
print(Person.__doc__)

0 commit comments

Comments
 (0)