0
On list
What is the difference b/n this codes Num=[0,1,2,3,4] print = (Num[3]) //and Num = list(range(5)) print = (Num[3])
3 Respostas
+ 5
Nothing
+ 3
No difference, but look ...
print = ( Num[ 3 ] )
Here you are assigning <Num[ 3 ]>, which is an `int` to a built-in function `print`. This triggers error when you try to call the actual built-in `print` function because it is now an `int`, and an `int` is not a callable object.
+ 2
John ,
the output with print() should be:
Num=[0,1,2,3,4]
print(Num[3]) #//and
Num = list(range(5))
print(Num[3])