0
[PYTHON] what instruction can i give to a condition, if i wanna know the type of a variable?
If i get a variable e.g: a = 2/3 And a condition eg: if a is a float: do like this. What kind of information can i give to the condition?
3 Antworten
0
a=2/3
if type(a)==float:
print("it's a floating number")
0
Thank you for your answer, it worked
0
👍