课程 \
Python3 入门教程(新版)
3-7 Python的字符串format
# Enter a code
template ='Life is {s}, you need {p}.'
short='short'
Python='Python'
result=template.format(s=short,p=Python)
print(result)
2022-03-08
查看完整代码
3-6 Python中raw字符串与多行字符串
# Enter a code
print(r'''"To be, or not to be": that is the question.
Whether it's nobler in the mind to suffer.''')
2022-03-08
查看完整代码
3-4 Python的布尔类型
# Enter a code
a = 'python'
print('hello,', a or 'world')
b = ''
print('hello,', b or 'world')
2022-02-21
查看完整代码
首页上一页123下一页尾页