You can just use semicolons. But why would you want to? It’s less readable and adds no value that I can see. Python is about readability. If you try to cram things onto one line, you’ll very soon find places where you simply can’t do what you want (e.g., loops cannot be put on one line, in general).
Better to learn to use the language idiomatically than to try to force it to work like something else just because it’s familiar to you.
There’s plenty of tutorials available online - or if you’re an experienced programmer in other languages, reading other people’s Python code might suit you better and give you a feel for what idiomatic Python looks like.
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.
I find it convenient with the command prompt without getting into the interactive shell. For example: C:\user>python -c "import sys; print(sys.path); import numpy; import matplotlib"