互联网技术 / 互联网资讯 · 2024年1月9日

Python练习实例:将字符串输出保存到磁盘文件”test”中

题目:从键盘输入一个字符串,将小写字母全部转换成大写字母,然后输出到一个磁盘文件”test”中保存。

程序源代码:

云计算开发:Python练习实例-字符串输出到磁盘文件"test"中保存

以上实例输出结果为:

云计算开发:Python练习实例-字符串输出到磁盘文件"test"中保存

OpenMagic API

Need more than content? Move into the product flow.

If you are here for model access, pricing, developer docs, or the future API console, the dedicated product path now lives on api.openmagic.ai.

登录免费注册