Integer checking | Sololearn: Learn to code for FREE!

0

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

+4

if a.is_integer(): ...

+1

yes, why not?

0

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

0

visph but can I add it in a function