Python: How to Create an Infinite Loop

preview_player
Показать описание
This tutorial shows you how to create an infinite loop program in Python.
Рекомендации по теме
Комментарии
Автор

what aboout if we create infinite for loop, ! yes i know books mentions that for loop can never be infinite but i have some amazing ideas:
we say something divided by 0 is infinity what if we assign the value 1/0 to any variable and use it as an ending range variable in for loop?
will the for loop be infinite as the ending range is itself infinite?
2- if we assign n as ending range in for loop and consider the value of n initially as 3
n=3
now
for i in range(n):
print('hello world")
n+=1
will the for loop be infinite?
as the ending range of for loop is increased every time it revolves throught the loop so it should never end till
i have many ideas like it....
i think we should explore beyond

aafiyamemon
Автор

Can I do this on the Python Command Line?

soulpwngaming
Автор

or you could just type in:

while 0 == 0:
print("Whatever you want")

alisterdavid
Автор

Thank you for the vid!
PD. I don't this is resource heavy at all

nixtoshi
Автор

I accidentally did this using * in java

Andrew-Guitar