title: How can I evaluate a string in Python?
body: <p>This is my code:</p>
  
  <pre><code>from decimal import *
  a = eval (input ("Pelase, give me a numbre: \n"))
  if type(a) not in (int, float, Decimal):
      print ("It's not possible to make a float from a complex number")
  else :
      a=float(a)
      print ("Now your number is", a, "and its type is" , type(a))
  </code></pre>
  
  <p>If the input is just text (<code>Hello</code> for instance) you get an error.</p>
  
  <p>I'd like to evaluate if it is a <code>str</code> and give advice to the user based on that evaluation.</p>