Apologies for overexplaining here.
I was trying to see if a string has any digits or not. So I wrote simple code for this, which is:
any(char.isdigit()