title: Invalid literal for int() but converting to float wont work either
body: <p>I'm creating a tweeter bot but the code won't run because of a conversion to an int literal.
  Even trying to convert to float creates an error.
  What's the solution here?</p>
  <p>This is the program code</p>
  <pre><code>import pandas as pd
  import time
  import tweepy
  
  appkey= &quot;##############&quot;
  appSecret= &quot;##############&quot;
  accessToken= &quot;##############&quot;
  acessSecret=&quot;##############&quot;
  
  
  latest_tweet_number =0
  with open(r'C:\\Users\Kweronda\Desktop\tweek\Quotes.csv') as f: 
      latest_tweet_number = int(f.read())
  
  print(latest_tweet_number)
  
  df = pd.read_csv(r'C:\Users\Kweronda\Desktop\tweek\Quotes.csv', sep =';')
  
  def tweet_post(msg):
      msg = msg[0:270]
      try:
          auth = tweepy.OAuth1UserHandler(appkey, appSecret)
          auth.set_access_token(accessToken, acessSecret)
          api = tweepy.API(auth)
          try:
              api.verify_credentials()
              print('Authentication Ok')
          except:
              print('Error authenticating')
  
          api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True)
          api.update_status(msg)
          print('tweet sent')
  
      except Exception as e:
          print(e)
  
  for idx, rows in df.iterrows():
      if idx &lt;= latest_tweet_number:
          continue
  
      hashtags = &quot;#inspiration #motivation quotes&quot;
      tweet_post(rows['Quote']+ ' - '+rows['AUTHOR']+ '\n\n\n' +hashtags)
  
      with open('C:\\Users\Kweronda\Desktop\tweek\latest.txt', &quot;w&quot;) as f:
          f.write(str(idx))
  
      print('done')
      time.sleep(1800)
  </code></pre>
  <p>This is the error;</p>
  <p>latest_tweet_number = int(f.read())
  ValueError: invalid literal for int() with base 10: 'QUOTE;AUTHOR;GENRE\nAge is an issue of mind over matter. If you don't mind, it doesn't matter.;Mark Twain;age\nAnyone who stops learning is old, whether at twenty or eighty. Anyone who keeps learni</p>