How to test if object is an integer?

Chris Angelico rosuav at gmail.com
Fri Oct 14 21:05:53 EDT 2011


2011/10/15 惜悯 <wauue at qq.com>:
> retrun True if type(i) is int else False

That tests if the object is already an int; the OP asked if a string
contains an integer.

ChrisA



More information about the Python-list mailing list