I started coding on python and moved on to Kotlin/android. I'm curious: when you want to convert types in python, it is generally as simple as str(x), but in kotlin - depending on type - it is different:
Integer.toString(x)
x.toString()
there's probably more since I'm new to this, but am I doing this all wrong or is it really actually this inconsistent. I'm trying to re-learn bad habits :-)
The standard way is to use toString(). All classes have a toString() function. In general, conversions from one class to another in Kotlin are always done by calling a function on that class instance that starts with the word .to.
The reason Integer.toString() exists is that if you're targeting the JVM, then all the Java standard library is available as well. Java has the concept of "primitives" which are not classes so they don't have functions, and so it provides Integer.toString() to be able to convert a primitive integer into a String.
Java has primitive wrapper classes that you pretty much should never touch in Kotlin:

java.lang.Integer
java.lang.Long
java.lang.Float

etc.
Type conversions inconsistent in Kotlin