get digit from a string python code example Example: python digit string import string print(string.digits) >> "0123456789"