Draw a graph using braille characters I hacked together a way to make a small graph using Braille unicode codepoints by abusing unicodedata:

def plot(timeline):
  ret = []
  for r1, r2 in zip(timeline[::2], timeline[1::2]):
    character_name = "BRAILLE PATTERN DOTS-"
    dots  = [x for x, y in zip("7321", range(r1))]
    dots += [x for x, y in zip("8654", range(r2))]
    character_name += "".join(sorted(dots))
    ret.append(unicodedata.lookup(character_name) if dots else " ")
  return "".join(ret)


&gt;&gt;&gt; print plot([random.randrange(0,4) for _ in range(100)])
 ⣆⣆⣶⣤⢠⡀⣦⡆⢀⡄⣰⣠⣦⣆⣰⢰⢠⢰⣄⡄ ⣀⣦⡆⣄⣶⣤⣠⡆⣠⣦⣆  ⣰⣴⡄⣤⣀ ⡀⣄⡀⣦⣶⣰⣶⣄⣴         


Barring low-hanging incremental improvements such as memoizing the call to unicodedata.lookup, what would be a more proper way to perform this lookup?
Why zip?

You have:

dots  = [x for x, y in zip("7321", range(r1))]
dots += [x for x, y in zip("8654", range(r2))]


You're never using the second part of that zip. So you're basically making lists for the two ranges, making lists for the two zips, making lists for the outcomes of those things, all to drop most of the information.

You can simplify that to just:

dots = '7321'[:r1] + '8654'[:r2]


character name

Try to avoid building up strings with +=. Instead just use format:

character_name = "BRAILLE PATTERN DOTS-{}".format(join(sorted(dots)))