[英]How do I store the result from reading a text file as a variable?
I'm trying to read from a text document我正在尝试从文本文档中读取
text_file.readline(2)
Any ideas how I could save the result under a variable?任何想法如何将结果保存在变量下?
variable = text_file.readline(2)
也许您应该阅读基本教程:)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.