+ 4
Python
How long can you run this code: even = [2*i for i in range(10000)] print(even) My record is 2914 :) Is it about internet connection or the mobile phone?
3 odpowiedzi
+ 4
Use yield function and you can run for infinite time(will never stop)
+ 4
Well my record is 1548.
After that it is showing Time limit exceeded.
Nobody will be able to run this whole code in the sololearn playground in mobile . It will show time limit exceeded as it has to print a large no. Of digits i.e. 10000
But if you run this in computer or in any other application such as pyroid 3 or Qpython.
There it will run the whole code.
Thanks
+ 4
With some minor modifications, I got to 19,998
https://code.sololearn.com/cpYWfYs6smSQ/?ref=app