Advertisement
JkSoftware

Day 17 - Class

Nov 26th, 2021
1,131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. class User:
  2.     def __init__(self, user_id, username):
  3.         self.id = user_id
  4.         self.username = username
  5.         self.follower = 0
  6.  
  7.  
  8. user_1 = User("001", "Johnny")
  9. user_2 = User("002", "John")
  10.  
  11. print(f'{user_1.id}, {user_1.username} Followers: {user_1.follower}\n{user_2.id}, {user_2.username} Followers: {user_2.follower}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement