Increasing the capacity of the IDE In Python like a Notepad?

懵懂的女人 提交于 2021-02-11 15:12:56

问题


I have a problem with my IDE in python... I want to make a list of numbers i.e (40,000,000) but when i place this command list(range(1000000)) it counted up to that no problem but i tried scrolling down to the start of the code and i noticed that it started from 999000 instead of 1 so i tried this instead list(range(1, 1000000))but it still didn't work out as it should. So what the IDE is actually doing is that if it gets to the maximum capacity, it dumps previous information for new ones. Are there any recommendations as to how to expand the IDE capacity like how it would be in a notepad?


回答1:


Some IDEs let you increase the number of "last lines" it can show, but soon or later you'll hit the wall again. Instead to output to a terminal emulator, try output to a file.


with open("output.txt", "w") as o:
    for i in range(len(my_list)):
        o.write("%d" % my_list[i])

Just open output.txt on Notepad.



来源:https://stackoverflow.com/questions/64868355/increasing-the-capacity-of-the-ide-in-python-like-a-notepad

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!