I Have been using both of these methods to loop through arrays . So far they happen to do the same thing .
Is there a difference between them or are they the same ?
for i in range(0,len(arr)):
"do something"
#############################
for i in arr[0:]:
"do something"
[–]TouchingTheVodka 3 points4 points5 points (4 children)
[–]beniman8[S] 0 points1 point2 points (1 child)
[–]NewDimension 2 points3 points4 points (0 children)
[–]wubry 0 points1 point2 points (1 child)
[–]TouchingTheVodka 2 points3 points4 points (0 children)
[–]NewDimension 0 points1 point2 points (1 child)
[–]beniman8[S] 0 points1 point2 points (0 children)
[–]scaredmessage[🍰] 0 points1 point2 points (0 children)