Skip to content

Instantly share code, notes, and snippets.

@mosbth
Created August 25, 2015 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save mosbth/b274bd08aab0ed0f9521 to your computer and use it in GitHub Desktop.
Save mosbth/b274bd08aab0ed0f9521 to your computer and use it in GitHub Desktop.
Hello World in Python
#!/usr/bin/env python3
"""
Some various ways of saying Hello World in Python
"""
def hello():
"""
Print out Hello World in a function.
"""
print("Hello World in a function.")
# Call a function that prints out Hello World
hello()
# Print out Hello World
print("Just saying Hello World")
# Assign the string Hello World to a variable and print it out
str = "Hello World in a variable"
print(str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment