Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def append_msg(message_body,userid,date):
- save = '[' + date + ']' + ' ' + username + ':'+ ' ' + message_body
- path = 'msg_log.txt'
- with open(path,'a') as msg_log:
- msg_log.write(save)
- def main():
- append_msg("Hi!","osman","11:34")
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement