title: time.time() float object has no attribute Error
body: <p>I am trying to time how long it takes different list sizes take to be sorted by a sort code I wrote.
  I create a random list of numbers from 1 to a thousand. Then I move larger numbers to the back slowly by comparing the number to the number in the next position. I move through the whole list like this then, check if the list is sorted and if not repeat the process.  Using a for loop I am attempting to calculate the time it takes the code to sort a list of increasing sizes.
  Here is the code:</p>
  
  <pre><code>import random
  import time
  sizeOfLargestList = int(input("Enter: "))
  
  def isItSorted(list):
      for postion in range(0, len(list)-1):
  
          if(list[postion] &gt; list[postion+1]):
              return False
      return True
  
  
  def sortTwoVar(list, position):
      if(list[position] &lt; list[position+1]):
          return True
      elif(list[position] == list[position+1]):
          return "Equal"
      else:
          return False
  
  
  def loopSort(list):
      numberOfEquivilentNumbers = 1
      for position in range(0, len(list)-1):
          sorted = sortTwoVar(list, position)
          if(sorted == False):
              for set in range(numberOfEquivilentNumbers):
                  numberMoving = list.pop(position-set)
                  list.insert(position+1, numberMoving)
              numberOfEquivilentNumbers = 1
          elif(sorted == "Equal"):
              numberOfEquivilentNumbers += 1
          else:
              numberOfEquivilentNumbers = 1
  
  
  def sorter(length):
      list = []
      for i in range(0,length):
          list.append(random.randint(0,1000))
      print("2")
      start = time.time()
      while(isItSorted(list) == 0):
          loopSort(list)
      print("3")
      end = time.time()
      return end-start
  
  
  for listSize in range(0,sizeOfLargestList):
      print("1")
      time = sorter(listSize)
      print("List Size:" , listSize , "Time To Execute:" , time)
  </code></pre>
  
  <p>Whenever I try to create a list longer then zero attributes I get an output like so:</p>
  
  <pre><code>Enter: 2
  1
  2
  3
  List Size: 0 Time To Execute: 0.0
  1
  2
  Traceback (most recent call last):
    File "C:\Python Codes\Sort Code restart.py", line 53, in &lt;module&gt;
      time = sorter(listSize)
    File "C:\Python Codes\Sort Code restart.py", line 43, in sorter
      start = time.time()
  AttributeError: 'float' object has no attribute 'time'
  </code></pre>
  
  <p>How can I fix my time element.</p>