>>> x=["x1","x3","x7","x5"]
>>> y="x3"

 how can i get the ordinal number by some codes?

for id ,value in enumerate(x):
    if y==value : print(id)

Is more simple way to do that?
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to