int() changes a string to an integer . For example, int(’12’) will give us an integer 12. In the above example, we are taking the input from the user as a string with the input() function and then we are using int() to change it to an integer.
int() changes a string to an integer . For example, int(’12’) will give us an integer 12. In the above example, we are taking the input from the user as a string with the input() function and then we are using int() to change it to an integer.