-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuser.py
More file actions
33 lines (24 loc) · 746 Bytes
/
user.py
File metadata and controls
33 lines (24 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
class User:
'''
This is a user class that helps generate new instances of a user.
'''
user_list=[]
def __init__(self,userName,userPassword):
'''
This is a method that will define the user properties.
'''
self.userName=userName
self.userPassword=userPassword
def save_user(self):
'''
This creates a method that saves each instance of a user into the user_list
'''
User.user_list.append(self)
@classmethod
def display_users(cls):
return cls.user_list
def delete_users(cls):
'''
This is a method that deletes saved contacts in a user_list
'''
User.user_list.remove(self)