title: Python equivalent for Arduino's map function
body: <p>Arduino has a <a href="https://www.arduino.cc/reference/en/language/functions/math/map/" rel="nofollow noreferrer"><code>map()</code></a> function that scales an integer value from one range to another. For example, you can take input from an 8-bit ADC sensor that ranges from 0–1024, and proportionally scale it to the range 0-100.</p>
  <p>How would I do this in Python?</p>