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

Learn More

Python Basics

Forked from Basic Python.

26 Runs 52 Views 6 Copies

A simple tutorial

Saved

Saved

crashcode 7

crashcode
published 3 months 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']
    time.sleep(2)
    
    # </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!."
    )
    time.sleep(2)
    
    # </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")
    time.sleep(2)
    
    # </END>
    Please login/signup to get access to the terminal.

    Your session has timed out.

    Dismiss (the page may not function properly).