像记事本一样在Python中增加IDE的容量? [英] Increasing the capacity of the IDE In Python like a Notepad?

查看:65
本文介绍了像记事本一样在Python中增加IDE的容量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在python中的IDE有问题...我想列出一个数字列表,例如(40,000,000),但是当我放置此命令时 list(range(1000000))算起来没问题,但是我尝试向下滚动到代码的开头,我注意到它从 999000 而不是 1 开始,所以我尝试了而是 list(range(1,1000000)),但仍然无法正常工作.因此,IDE实际在做的是,如果达到最大容量,它将为新信息转储先前的信息.是否有关于如何像在记事本中那样扩展IDE容量的建议?

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?

推荐答案

某些IDE可以让您增加最后几行"的数量.它可以显示,但迟早您会再次碰壁.而不是输出到终端仿真器,请尝试输出到文件.

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])

只需在记事本上打开output.txt.

Just open output.txt on Notepad.

这篇关于像记事本一样在Python中增加IDE的容量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆