KimKat

Python Hello World

Feb 10th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. class Hello:
  2.     def __init__(self):
  3.         self.v = ""
  4.     def my(self,v): # "my" in Perl would just be a local variable. (http://tinyurl.com/perl-my)
  5.         self.v = v
  6.         print(v)
  7.  
  8. def main():
  9.     Hello.my("\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64")
  10.  
  11. if __name__=='__main__':
  12.     main()
  13.  
  14. # Input: Hello.my("Hello World")
  15. # Result: Hello World
Add Comment
Please, Sign In to add comment