《“笨办法”学Python》——习题6 字符串与文本
程序代码及注释如下:# -*- coding: utf-8 -*-
#将字符串赋给x,并用格式控制符将10传给字符串中的%d
x = "There are %d types of people." % 10
#设置变量binary
binary = "binary"
#设置字符串变量do_not
do_not = "don't"
#设置变量y,同时这里输出两个字符串,此处两处“把一个字符串放进另一...
原创
2018-03-14 15:50:21 ·
292 阅读 ·
0 评论