removeAt
Removes an element at the specified index from the list.
All elements placed after index are shifted 1 position left.
Since Kotlin
1.4Return
the element that has been removed.
Throws
Samples
import kotlin.math.*
import kotlin.test.*
fun main() {
//sampleStart
val list = mutableListOf('a', 'b', 'c')
list.removeAt(1)
println(list) // [a, c]
list.removeAt(0)
println(list) // [c]
// list.removeAt(1) // will fail with IndexOutOfBoundsException
//sampleEnd
}