cjwinchester / cheers

Fixing the United Airlines cocktail napkin acrostic.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cheers!

A quick project to fix the acrostic on this United Airlines cocktail napkin:

can u believe this

The goal of the Python script was to create and export a JSON object with the top-level keys being the index position of the column of interest (0 = first letter of each word, 1 = second letter of each word, etc.), and the values being a dict whose keys are the individual letters in "CHEERS" (so, "CHERS") and the values a list of cities that have that letter in that index position:

{
    "0": {
        "C": ["CALGARY", "CHARLOTTE" ...],
        "H": ["HALIFAX", "HOUSTON", ...],
        "E": ["EDINBURGH", "EVERETT", ...],
        "R": ["REDMOND", "RAPID CITY", ...],
        "S": ["SACRAMENTO", "STOCKHOLM", ...]
    },
    "1": {
        "C": ["ACAPULCO", "ACCRA", ...],
        "H": ["CHARLESTON", "CHARLOTTE", ...],
        "E": ["BEIJING", "BELFAST", ...],
        "R": ["BRIDGETOWN", "BRISBANE", ...],
        "S": ["ISTANBUL", "OSAKA", ...]
    }, ...
}

About

Fixing the United Airlines cocktail napkin acrostic.

License:The Unlicense


Languages

Language:Python 41.6%Language:JavaScript 28.7%Language:HTML 20.6%Language:CSS 9.1%