title: Convert strings to int or float in Python 3?
body: <pre><code> integer = input("Number: ")
   rslt = int(integer)+2
   print('2 + ' + integer + ' = ' + rslt)
   double = input("Point Number: ")
   print('2.5 + ' +double+' = ' +(float(double)+2.5))
  </code></pre>
  
  <p>Gives me</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\...", line 13, in &lt;module&gt;
      print('2 + ' + integer + ' = ' + rslt)
  TypeError: Can't convert 'int' object to str implicitly
  </code></pre>
  
  <p>I'm fairly new to programming and my background is mostly just the basics of C# so far. I wanted to try to learn Python through doing all my C# school projects on Python. I'm used to the simple syntax of C# which would look something like this:</p>
  
  <pre><code>int integer = Convert.ToInt32(Console.ReadLine())
  </code></pre>
  
  <p>or</p>
  
  <pre><code>double double = Convert.ToDouble(Console.ReadLine())
  </code></pre>
  
  <p>Which takes a user input string and converts it to what I specified.</p>
  
  <p>I think I read py2.x has a command called raw_input that works a bit better than the input command of py3.x in this regard.</p>
  
  <p>I was trying to find myself a similar format as the one I'm used to in C# to use in Python, but it's proving surprisingly hard just to find a method to convert the user input string into an integer after all this googling and trying everything I could think of (and that I found on google) I decided it was time to ask. Can you help?</p>