+ 1

How to type int and float

18th Mar 2021, 9:30 AM
C/lahi Cali
C/lahi Cali - avatar
6 Respostas
+ 6
Question not clear. a = int('7') b = float("9.45") print(a) print(b)
18th Mar 2021, 9:33 AM
Avinesh
Avinesh - avatar
+ 2
Pro thanks but I want to write ✍ type Like this X=2 Print (type(x))
18th Mar 2021, 9:38 AM
C/lahi Cali
C/lahi Cali - avatar
+ 2
did you mean: print(type(x).__name__) ?
18th Mar 2021, 9:48 AM
visph
visph - avatar
+ 2
Is this what you mean? x = 2 y = 3.0 z = '4' print(type(x)) print(type(y)) print(type(z))
18th Mar 2021, 9:50 AM
Rik Wittkopp
Rik Wittkopp - avatar
- 1
Yeah pro
18th Mar 2021, 9:57 AM
C/lahi Cali
C/lahi Cali - avatar
- 1
Is this
18th Mar 2021, 9:57 AM
C/lahi Cali
C/lahi Cali - avatar