9 Answers
+ 6
When I tried, it printed 10000 lines, but not 100000 linesā¦
Maybe itās conected to the execution time. So, for example, because a for loop is faster then a while loop, you can print out more lines with a for loop. But thatās just a hypothesis š.
+ 4
I don't believe sololearn has output limits, but it definitely has time limits. I believe sololearn also collects the output and, if your code times out, sololearn only returns a portion of the output.
19 Jul edit: Per Bratthammar subsequently proved that sololearn does have output limits
+ 3
Hi, Raheray !
Canāt you try figure it out by yourself?
Try run:
n = 10000
for i in range(n): print(i)
and see how long time you can
increase the number n.
+ 3
HI, Alba Robledo !
Well, 100 lines are a small number in this context. I ran the two code lines below on SoloLearns app on my iPhone, and it printed out 18517 lines, but not more.
n = 18518
for i in range(n): print(i)
+ 2
In SoloLearn time of execution runs out quick, I guess this is in order to not overload mobile devices. I'd say around 100 lines
+ 2
Per Bratthammar I was able to confirm the 18518 number with this code:
print(*[n for n in range(15818)],sep='\n')
Which I wouldn't expect to perform the same as your code.
https://code.sololearn.com/c4Fu1s5v7Xj3/?ref=app
+ 2
Raheray , Per Bratthammar , and Alba Robledo I think the actual limit is 100000 characters.
https://code.sololearn.com/cYxC4N59mE2H/?ref=app
+ 1
Are you asking about the language itself, or about running python code within sololearn?
+ 1
About Python with Sololearn