title: how to convert float and string into integer value in python3
body: <p>i have a value which is float and string (it's in quotation marks) and i have to convert a integer value.
  for example ,when i write <code>x = "1.2"</code>, i want take this output:<code>1</code></p>
  
  <p>i wrote this code:</p>
  
  <pre><code>x = "1.2"
  print(int(x))
  </code></pre>
  
  <p>but i get this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File xxx, line 2, in &lt;module&gt;
      print(int(x))
  ValueError: invalid literal for int() with base 10: '1.2'
  </code></pre>
  
  <p>how can i fix this ?</p>