title: TypeError: 'float' object is not subscriptable when trying to create substring
body: <p>So I have this code:</p>
  <pre><code># Imports
  import sys
  import random
  
  # Data Collection
  UserID = int(sys.argv[1])
  KeyA = int(sys.argv[2])
  PI = 3.14159265359
  
  # Calculation
  PIUserID = UserID * PI
  PIKeyA = KeyA * PI
  PIKeyB = PIKeyA + 4
  
  CalcUserID = PIUserID / 9
  CalcUserID2 = PIUserID - PIKeyA
  CalcKeys = (PIKeyA + CalcUserID2) / (((PIKeyB - PIKeyA) * 2) + 1)
  
  MidCalcKeyBC = str(PIKeyB / PI)
  
  ResultUserID = UserID
  ResultKeyA = KeyA
  ResultKeyB = MidCalcKeyBC.split('.')[0]
  ResultKeyC = MidCalcKeyBC.split('.')[1]
  
  # Finish!
  print(&quot;User ID: &quot; + str(ResultUserID))
  print(&quot;Key A: &quot; + str(ResultKeyA))
  print(&quot;Key B: &quot; + str(ResultKeyB))
  print(&quot;Key C: &quot; + str(ResultKeyC))
  print(&quot;Calc Keys: &quot; + str(CalcKeys))
  print(&quot;&quot;)
  StrCalcKeys = str(CalcKeys)
  StrCalcUserID = str(CalcUserID)
  print(&quot;Success: &quot; + str(CalcKeys[:len(StrCalcKeys) - 1]) == str(CalcUserID[:len(StrCalcUserID) - 1]))
  </code></pre>
  <p>It is supposed to calculate the KeyB and KeyC with just getting fed the UserID and the KeyA.</p>
  <p>And when I run it like so: <code>python CalculateLogin.py 12 376</code> i get the error:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;f:/Unity/Projects/Project Astra/Assets/Scripts/createCredentials.py&quot;, line 35, in &lt;module&gt;
      print(&quot;Success: &quot; + str(CalcKeys[:len(StrCalcKeys) - 1]) == str(CalcUserID[:len(StrCalcUserID) - 1]))
  TypeError: 'float' object is not subscriptable
  </code></pre>
  <p>right when it should say <code>Success: True</code>.</p>