Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Alphabet Websites - One Letter Per Site

## Lowercase Letters

This code can be used when you only need a sub-set of letters (e.g "a" thru "e"):

Code

letters_lowercase = [chr(c) for c in range(ord('a'), ord('a') + 5 )]

print(letters_lowercase)

Outputs:

Code

['a', 'b', 'c', 'd', 'e']

## Uppercase Letters

Code

letters_upper_case = [chr(c) for c in range(ord('A'), ord('A') + 5 )]

print(letters_uppercase)

Which outputs:

Code

['A', 'B', 'C', 'D', 'E']

### How It Works -

Beyond List Comprehensions (which I'm still getting my head around), there are two keys to making this work:

1. `ord()` which turns a character into a number, and 2. `chr()` which turns a number into a character

TKTKTKT