How to get block indexes in Python

looks like you already opened your own topic.

Please do not necro-bump.