
Dec. 17, 2021
4:14 p.m.
hi, I am a beginner, but still you must see this prob. See this code: If i will Put the value of X = 1, it will show Not Valid! , At this moment python should show an error that , how can be the variable X , be int and float at the same time , But still it shows Not Valid! I think it needs to be fixed to make python more intelligent language. if isinstance(x, int) and isinstance(x, float) and x=='1': print("Valid type!") else: print("Not valid!")