IndexPythonJapaneseChainmailleLeather

Integer Function

int() - Converts the value in the parenthesis to integer data type.
  An integer is any whole number: positive, negative, or 0. No decimals.

   year = "2024"
   age = "39"
   print(year - age)
    <Output Error>

  However

   year = "2024"
   age = "39"
   print(int(year) - int(age))
    1985

*Note - Using int() to convert a float will just chop off the decimal point:
  int(3.14) = 3
  int(3.90) = 3
HomeData TypesVariablesFunctionsEscape SequencesProgram Comments