Advertisement
JkSoftware

Day 17 - Class

Nov 26th, 2021
1,008
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement