I learned that brackets can be used to qualify range() function. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

I learned that brackets can be used to qualify range() function.

Ex. Range[3] would output list [0,1,2,3] instead of [0,1,2]. So brackets would mean up to and including 3. But this doesn't work in the coding playground. Can anyone explain why it doesn't?

22nd Dec 2016, 8:05 PM
Devin
1 Answer
0
It won't work because first : range doesn't output a list and also because Range is an undefined variable. You can't use brackets to qualify range
22nd Dec 2016, 9:09 PM
Amaras A
Amaras A - avatar