os.path.isfile()

Returns True, if the argument points to a regular file.

In [7]: import os
In [8]: os.path.isfile('/etc/fstab')
Out[8]: True