Python - one result from a list -


i dont know if did choose title, here goes:

i have list need produce 1 result not of them!

for in range(len(f)):     print i+1,d[i]  1 -0.0002 2 0.0 3 0.0 4 0.0 5 -3.2e-05 6 -0.000376 

i need last result. use loop of them. there way that?

just index last element your_list[-1] so:

print(d[-1]) 

if f not length d use f -1 index list:

print(d[f-1]) 

Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -