Avoid Using The For Loop in Python (whenever possible)

preview_player
Показать описание
In this video, we'll see a faster way to loop in Python.

--------------------
Content:
0:00 The average loop
1:03 Built-in Functions
1:42 Vectorization with Numpy
2:47 Putting Numpy to the test
Рекомендации по теме
Комментарии
Автор

thank you soo much!! your videos help me out a lot!!

farhanahmedfahim
Автор

Thanks, but i have questions
if i have code:

list = [0]
for i in
rand = random.randint(1, 2)
if rand == 1:
a = list[i] * 0.5
list.append(a)
elif rand == 2:
a = list[i] + 3
list.append(a)
Print(list)

Can this code solved by numpy?

kenoi
visit shbcf.ru