+ 1
Why print (int("2.000")) is invalid??
4 Respostas
+ 2
your converting a string 2.000 to an int 2.000 which won't work u can't cast twice try using print print(int (float ("2.000")))
+ 1
A double casting would work:
print (int(float("2.000"))) # 2
0
i dnt knw python much but i think u a passing value as string using "" so its unable to convert string to integer
0
Thank you...