title: Python type hints: how to do a literal range
body: <p>I use type hints with pydantic to set return schema for my Python API.</p>
  <p>I would like to write a literal type that allows the numbers 0 to 100. This is easy typing it out manually:</p>
  <pre class="lang-py prettyprint-override"><code>from typing import Literal
  MyType = Literal[0, 1, 2, ... , 99, 100]
  </code></pre>
  <p>This is not particularly pythonic and I'm looking for a shorthand, essentially:</p>
  <pre class="lang-py prettyprint-override"><code>Literal[range(101)]
  </code></pre>
  <p>Unfortunately the above expects the literal value that is <code>range(101)</code>. I have also tried:</p>
  <pre class="lang-py prettyprint-override"><code>Literal[list(range(101))]
  Literal[0:101]
  </code></pre>
  <p>However these fail as <code>list</code> and <code>slice</code> are unhashable types.</p>
  <p>How do I do this without typing out the numbers 0 through 100?</p>