how to extract integer from string in python