Integer checking | Sololearn: Learn to code for FREE!


Integer checking

I have a = float(input()) How can I check if a is an integer ? Thank you

2/12/2021 7:48:32 PM

Ngọc Tuấn 🇻🇳

4 Answers

New Answer


if a.is_integer(): ...


yes, why not?


visph wow, it is that simple, thank you so much


visph but can I add it in a function