What is range in Python?


Warning: Trying to access array offset on false in /home3/indiakep/public_html/wp-content/plugins/dw-question-answer/inc/Template.php on line 8
All QuestionsCategory: PythonWhat is range in Python?
Chetan Shidling asked 6 years ago

I need short information.

1 Answers
chetan shidling answered 6 years ago

Range is used to print values. For example
 
x = range(10)
print(x)
 
Then, output will be 
0
1
2
3
4
5
6
7
8
9
 
By using range you can print values…