title: Python, Human Readable to Byte Conversion
body: <p>i'm tried to convert human readable form to byte in python. I figured byte to human readable form, but i cannot figure reverse of it.</p>
  
  <p>I tried some codes from stackowerflow but it will not works perfectly, or i could not find the correct ones.</p>
  
  <pre><code>@staticmethod
  def byte_to_human_read(byte):
      if byte == 0:
          raise ValueError("Size is not valid.")
      byte = int(byte)
      size_name = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB")
      index = int(math.floor(math.log(byte, 1024)))
      power = math.pow(1024, index)
      size = round(byte / power, 2)
      return "{} {}".format(size, size_name[index])
  
  @staticmethod
  def human_read_to_byte(size):
      - I need here - 
  </code></pre>
  
  <p>I need def human_read_to_byte(size) function.</p>
  
  <p>Example: input -> 1 GB output -> 1,073,741,824 (in byte)</p>