problem with cycle

0

friends I need to separate the first digit for a number read but I have not been able to do what I've done always separates me the last:

try:
    numero=int(input("Digite un numero entero:"))

    suma=0

    for i in str(numero):
        suma= i 
    print(i)

except ValueError:
    print("El valor digitado debe ser numerico")
    
asked by Andress115 28.08.2018 в 04:22
source

0 answers