Speed up development with full-stack environments for every branch.

Learn More

Python Basics

Forked from Basic Python.

26 Runs 50 Views 6 Copies

A simple tutorial



crashcode 7

published a month ago

    # Python Basics
    # Worksheet by Cr4sH CoD3
    # Imports
    import time
    # Dictionary
    print ("\n\n---> \"%s\"") % "Dictionary"
    dictionary = {
        'Name': 'Crash Code',
        'Age': '1337',
        'Language': 'Python'
    print "Name: ", dictionary['Name']
    print "Age: ", dictionary['Age']
    print "Language: ", dictionary['Language']
    # </END>
    # Formatter
    print ("\n\n---> \"%s\"") % "Formatter"
    formatter = "%r %r %r %r"
    print formatter % (1, 3, 3, 7)
    print formatter % ("one", "three", "three", "seven")
    print formatter % (True, False, False, True)
    print formatter % (formatter, formatter, formatter, formatter)
    print formatter % (
        "We are Anonymous.",
        "We do not forgive.",
        "We do not forget.",
        "Expect US!."
    # </END>
    # Escape Sequences
    print ("\n\n---> \"%s\"") % "Escape Sequences"
    print ("\t I am Tabbed")
    print ("#####overwrite\rI am ")
    print ("This is how to do a \\, \', and \" in python")
    print ("This is an \117\143\164\141\154 and a \x48\x65\x78 in python")
    # </END>
    Please login/signup to get access to the terminal.

    Your session has timed out.

    Dismiss (the page may not function properly).