摘要: print(" 换行打印内容 ")y = 'hello\nword' # \n转义字符,代表回车\tprint(y)输出结果: print("--打印的字符串有单引号和双引号--")print('hello, \"world\", \'yo\' ')输出结果: print("--只打印字母--")p 阅读全文
posted @ 2023-01-11 18:09 Jenny测试开发 阅读(61) 评论(0) 推荐(0) 编辑
摘要: """字符串格式化"""name = 'Jenny'age = 30x = "my name is %s, age is 20" % nameprint(x)x1 = "my name is %s, age is %s" % (name, age)print(x1)# 第二种y = "my name 阅读全文
posted @ 2023-01-11 18:00 Jenny测试开发 阅读(15) 评论(0) 推荐(0) 编辑