Indexing float values in Python

后端 未结 2 1566
清酒与你
清酒与你 2021-01-24 06:31

I have a list of floats generated from a data structure which is a list of dictionaries - i.e. I\'ve iterated over the whole list and selected for certain values in the given di

2条回答
  •  半阙折子戏
    2021-01-24 06:45

    If I understand correctly, you have generated a list of floats, each one from one of the dicts in the original list. Instead of generating a list of floats, why not generate a list of 2-tuples, being the float and it's corresponding dictionary-list-index...

提交回复
热议问题