I'm new to Solidity.
Does solidity have a method like range() to generate numbers within the range like [1:5] -> [1,2,3,4,5]? Or need to use for loop?
For example, a = list(range(1,21)) is what I used to do with Python, In Solidity, uint[20] SampleArray; SampleArray = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]; this or need to use for loop by pushing numbers in a dynamic array would be the way? Would there be more simple way?
Also, I still don't get why people declare the value first and then assign later in Solidity.