![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
嘉永
饥渴的IT菜鸟一只...
展开
-
关于Python输出方式(the value of x + y is z)
在Python中输出“the value of x + y is z“型的语句,x,y,z均表示数值,假定均为int 一般而言, 有2种输出方式 1. print ("the value of %d + %d is %d") % (x,y,z) 2. print ("the value of "+str(x)+" + "+str(y)+" is "+str(z)) 方式1与C中printf原创 2015-07-02 22:00:17 · 656 阅读 · 0 评论 -
C & Python 文件操作
C语言中,FILE *file; file = fopen ("new_file.txt", "w"); : file 为一文件指针, 故后续操作 fputs (buffer, file)... 是把文件当为变量,基于过程的操作方式。 Python语言(其他面对对象语...)中,file = open ("new_file.txt", "w"): file 为一文件对象, 故后续操原创 2015-09-13 13:59:18 · 325 阅读 · 1 评论 -
http://blog.csdn.net/longshenlmj/article/deta
Python 命令行编译 使用非ASCII : 在文件首写 # -*- coding: utf-8 -*-转载 2015-09-13 17:06:16 · 630 阅读 · 0 评论