[ create a new paste ] login | about

Link: http://codepad.org/YjLABkx9    [ raw code | output | fork ]

Python, pasted on Jul 3:
# Game Over - Version 2
# Demonstrates the use of quotes in strings

print("Program 'Game Over' 2.0")

print("Same", "message", "as before") # When having more than 1 item in the print
# They must be seperated by a comma ','

# 1 statement on 3 lines still seperated by commas ','
print("Just",
      "a bit",
      "bigger")

# There is a new-line character at the end of every print() by default, 
# unless end = which is used to specify the end character and
# overwrites the new-line character.
print("Here", end=" ")
print("it is...")

print( # Triple Quotes will be displayed exactly as displayed in print()
        """
         _____       ___       ___  ___   _____  
        /  ___|     /   |     /   |/   | |  ___| 
        | |        / /| |    / /|   /| | | |__   
        | |  _    / ___ |   / / |__/ | | |  __|  
        | |_| |  / /  | |  / /       | | | |___  
        \_____/ /_/   |_| /_/        |_| |_____|
         
         _____   _     _   _____   _____   
        /  _  \ | |   / / |  ___| |  _  \  
        | | | | | |  / /  | |__   | |_| |  
        | | | | | | / /   |  __|  |  _  /  
        | |_| | | |/ /    | |___  | | \ \  
        \_____/ |___/     |_____| |_|  \_\

        """
     )

input("\n\nPress the enter key to exit.")


Output:
1
2
3
4
  Line 17
    print("Here", end=" ")
                     ^
SyntaxError: invalid syntax


Create a new paste based on this one


Comments: