In this>>> list(range(5)) can be num(range(5))? | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 1

In this>>> list(range(5)) can be num(range(5))?

"list" already created by user or is self defined in python

25th Feb 2018, 9:33 PM
Devvrat Marwah
Devvrat Marwah - avatar
1 Réponse
+ 3
That list() is a function in python3 so you can’t use num instead. See a good explanation of range function here: https://www.pythoncentral.io/pythons-range-function-explained/
25th Feb 2018, 10:52 PM
Sergiu Panaite
Sergiu Panaite - avatar