From a file with numbers in the list I must select the floating ones of the integers, for that I must transform them from strings to floating and integers, having to differentiate which ones are floating and which integers, for this I have designed the following program, but the failure it is in which the floats of more than one decimal do not identify them, although he said that for this he must identify the character "."
nombre_entrada = raw_input('Nombre del fichero de entrada: ')
f_entrada = open(nombre_entrada, 'r')
lista = []
for i in f_entrada:
if i[-1] == '\n':
lista.append(i[:-1])
else:
lista.append(i)
lista2 = []
for i in lista:
print i
for caracter in i:
if caracter == ".":
lista2.append(float(i))
lista.remove(i)
print lista
print lista2