Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to take first digit of number python

>>> number = 1520
>>> int(str(number)[:2])
15
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #digit #number #python
ADD COMMENT
Topic
Name
3+4 =