Skip to content

Numeric Functions

Python Numeric Functions

  • float(int) Converts an integer to a float 10 --> 10.0
  • float(str) Converts a string to a float float("10.3") --> 10.3
  • int(float) Converts and truncates float to integer
  • int(str) Converts string to integer