In addition to what @pf_moore said regarding looking through tutorials and the code of other people, I would highly recommend checking out PEP-8. It’s quite lengthy, but it’s the official styling guide for Python and well worth the read. This won’t tell you everything you need to know, but it’s a great place to start.
Also, regarding the specific code example you’re using, instead of using a separate list for the indexes, you can simply use a tuple. Typically the first item is the index, and the second one is the actual value:
A significant part of idiomatic code design also involves utilizing the correct data structures and class design. Much of this is covered in the official tutorial.