def representsInteger(str):
   """
   Checks if a string only contains integers

   :param str str: string we want to check only has integers
   :return: if string only contains integers
   :rtype: boolean
   """
   try:
      int(str)
      return True
   except ValueError:
      return False