daily pastebin goal
62%
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import sys
  2.  
  3. def pipe(func):
  4.     while True:
  5.         val = yield
  6.         func(val)
  7.  
  8.  
  9. x = pipe(sys.stdout.write)
  10.  
  11. x.next()
  12.  
  13. x.send("Hello, World!\n")
  14. x.send("This is fucking weird!\n")
RAW Paste Data
Pastebin PRO WINTER Special!
Get 40% OFF Pastebin PRO accounts!
Top