title: How to accept the input of both int and float types?
body: <p>I am making a currency converter. How do I get python to accept both integer and float?</p>
  
  <p>This is how I did it:</p>
  
  <pre><code>def aud_brl(amount,From,to):
      ER = 0.42108
      if amount == int:
          if From.strip() == 'aud' and to.strip() == 'brl':
              ab = int(amount)/ER
           print(ab)
          elif From.strip() == 'brl' and to.strip() == 'aud':
              ba = int(amount)*ER
           print(ba)
      if amount == float:
          if From.strip() == 'aud' and to.strip() == 'brl':
              ab = float(amount)/ER
           print(ab)
          elif From.strip() == 'brl' and to.strip() == 'aud':
              ba = float(amount)*ER
           print(ba)
  
  def question():
      amount = input("Amount: ")
      From = input("From: ")
      to = input("To: ")
  
      if From == 'aud' or 'brl' and to == 'aud' or 'brl':
          aud_brl(amount,From,to)
  
  question()
  </code></pre>
  
  <p>Simple example of how I did it:</p>
  
  <pre><code>number = input("Enter a number: ")
  
  if number == int:
      print("integer")
  if number == float:
      print("float")
  </code></pre>
  
  <p>These two don't work.</p>