Is there a better way to create a mutable list of a given range?

后端 未结 0 1071
夕颜
夕颜 2021-01-14 07:34

What I\'m currently doing:

var idList = mutableListOf()

fun main() {
    for (number in 1000000..1999999) {
        idList.add(number)
    }

             


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题