Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. def add_subscriber(self, id):
  2. with open(self.users_file, 'w') as f:
  3. lines = f.read().splitlines()
  4. subscriber_ids = []
  5. for l in lines:
  6. subscriber_ids.append(l)
  7. subscriber_ids.append(id)
  8. f.write('\n'.join(subscriber_ids))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement