Advertisement
bthmos

Python hello world example

Jul 3rd, 2014
411
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. #!/usr/bin/env python3
  2. """
  3. Some various ways of saying Hello World in Python
  4. """
  5.  
  6. def hello():
  7.     """
  8.    Print out Hello World in a function.
  9.    """
  10.     print("Hello World in a function.")
  11.  
  12. # Call a function that prints out Hello World
  13. hello()
  14.  
  15. # Print out Hello World
  16. print("Just saying Hello World")
  17.  
  18. # Assign the string Hello World to a variable and print it out
  19. str = "Hello World in a variable"
  20. print(str)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement