Python has the pprint module, which takes care of this for you, and for more datatypes than are done here. (I don't see how this would handle a hashmap in a sensible way.)
But I'm not sure how this addresses what I was saying, which is that the intuitions about algorithms you get working on Python are easier to transfer to popular languages like C++, Java, Javascript, Rust, etc..