title: String conversion to Number
body: <p>I'm writing a programming language in python, and I need to convert a <strong>String</strong> into an <strong>Integer</strong> or a  <strong>Floating Point Number</strong> depending on what the type of the converted value is. I used ternary operators and even created a function that returned the type of a value as a string:</p>
  <pre><code>def rtrn_as_str(value):
    return str(type(value))[8:-2]
  </code></pre>
  <p>and this is the output:</p>
  <pre><code>&gt;&gt;&gt;rtrn_as_str(123)
  'int'
  &gt;&gt;&gt;rtrn_as_str('A')
  'str'
  </code></pre>
  <p>But I couldn't find a way to convert a string into a float or int like in Javascript. Can anyone help me with this?</p>