DEV Community

Discussion on: List/Dict comprehension

Collapse
 
joshuatbadger profile image
joshuatbadger

Alternatively, you can still one-line this.

[chr(x + 66) if x % 2 == 0 else chr(x + 65) for x in range(20)]