title: Generic Type conversion in Python
body: <p>How can I perform a generic type conversion in python similar to the following mechanism that I use in C# .NET:</p>
  
  <pre><code>string typetoConvertTo = "System.String";
  string value = (string)Convert.ChangeType( "1", Type.GetType( typetoConvertTo ));
  
  typetoConvertTo = "System.Int32";
  int value1 = (int)Convert.ChangeType( "1", Type.GetType(typetoConvertTo));
  </code></pre>
  
  <p>Python has type conversion for individual types, but I need something more generic like the above method in .NET since I am storing the type and need to perform a generic conversion later.  </p>
  
  <pre><code>value = str(100)
  value1 = int("100")
  </code></pre>