How to create a mutable list in Kotlin?
Kotlin has its own keyword to create list which are mutable As a child I learned that our solar system has nine planets val planets = mutableListOf(“Mercury”, “Venus”, “Earth”, “Mars”, “Jupiter”, “Saturn”, “Uranus”, “Neptune”, “Pluto”) println(planets) In 2006 Pluto was reclassified as a dwarf planet. So let’s remove Pluto planets.remove(“Pluto”) println(planets)