how to fill an array with consecutive numbers python

Solutions on MaxInterview for how to fill an array with consecutive numbers python by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "how to fill an array with consecutive numbers python"
Betty
07 May 2017
1array = [x for x in range(0, 10)]
2
3print(array)
4
5#OUTPUT: [0, 1, 2, 3, 4, 5 6, 7, 8, 9]