►
Run
float_value = 5.2 str_value = "34" complex_value = 3.14j float_value_to_int = int(float_value) str_value_to_int = int(str_value) str_value_to_int_base_8 = int(str_value,8) str_value_to_int_base_6 = int(str_value,6) complex_value_to_int = int(abs(complex_value)) print(float_value_to_int) print(str_value_to_int) print(str_value_to_int_base_8) print(str_value_to_int_base_6) print(complex_value_to_int)
Output