Can someone explain Range in python? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Can someone explain Range in python?

Complete explanation please

19th Nov 2018, 2:46 PM
Marwa Ashfaq
3 Answers
+ 4
The range function creates a sequential list of numbers. The code below generates a list containing all of the integers, up to 10. If range is called with one argument, it produces an object with values from 0 to that argument. If it is called with two arguments, it produces values from the first to the second. range can have a third argument, which determines the interval of the sequence produced. This third argument must be an integer.
19th Nov 2018, 2:57 PM
Ben
Ben - avatar
19th Nov 2018, 4:02 PM
Maninder $ingh
Maninder $ingh - avatar
0
Thanks alot Maninder $ingh
19th Nov 2018, 4:04 PM
Marwa Ashfaq