python change variable type code example
Example 1: python get int from string
>>> import re
>>> string1 = "498results should get"
>>> int(re.search(r'\d+', string1).group())
498
Example 2: change variable type python
x = 12
str(x) #it's a String now
number = "24"
int(number) #it's an integer now