This article discussed how to read and write data to a file from a Python program.
这篇文章讨论了在Python程序中如何从文件读取数据和写入数据到文件中。
The program in Listing 3 shows how to do that in Python: the code takes a tar filename as a command-line argument and then prompts the user with several options.
清单3中的程序说明了如何在Python中完成这项工作:这段代码接受一个tar文件的名称作为命令行参数,然后向用户提供几种选择。
Now, Listing 3 shows how to read this data into a Python program and parse the contents of the file.
现在,清单3显示如何把这个数据读入Python程序,并解析文件的内容。
It discussed how to use methods, or reusable blocks of code, in a Python program.
讨论了如何在Python程序中使用方法或可重用块。
"Discover Python, Part 4" introduces the Python list and demonstrates how to use it within a Python program.
“探索python,第4部分”介绍了Pythonlist并演示了如何在Python程序中使用它。
The commands in Listing 10 show how to run a Python program contained in a file.
清单10中的命令展示了运行一个包含于文件之中的Python程序的方法。
The commands in Listing 10 show how to run a Python program contained in a file.
清单10中的命令展示了运行一个包含于文件之中的Python程序的方法。
应用推荐