Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import contextlib
- @contextlib.contextmanager
- def lennyface():
- global print
- oldprint = print
- def new_print(*args, **kwargs):
- #newargs = [a.replace(' ', '( ͡° ͜ʖ ͡°)') for a in args]
- args = list(args)
- args.append('( ͡° ͜ʖ ͡°)')
- oldprint(*args, **kwargs)
- try:
- __builtins__['print'] = new_print
- yield
- finally:
- __builtins__['print'] = oldprint
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement