title: Convert an IP string to a number and vice versa
body: <p>How would I use python to convert an IP address that comes as a <code>str</code> to a decimal number and vice versa? </p>
  
  <p>For example, for the IP <code>186.99.109.000 &lt;type'str'&gt;</code>, I would like to have a decimal or binary form that is easy to store in a database, and then retrieve it.</p>