Answers for "to number python"

1

python get int from string

>>> import re
>>> string1 = "498results should get"
>>> int(re.search(r'd+', string1).group())
498
Posted by: Guest on April-07-2020
1

convert string to number python

>>> x = "23"
>>> y = "20"
>>> z = int(x) - int(y)
>>> z
3
Posted by: Guest on March-13-2021
0

how to respond to a number in python

variablename = int(input('Text You Want'))

if variablename == 1:
    print('You Typed 1')
Posted by: Guest on April-04-2021

Python Answers by Framework

Browse Popular Code Answers by Language