tips

作者: YYece | 来源:发表于2018-12-24 14:50 被阅读0次
  • print不换行
for i in range(5):
    print(i,end=" ")
    
0 1 2 3 4 
  • center(width, fillchar)

返回一个指定的宽度 width 居中的字符串,fillchar 为填充的字符,默认为空格。

print("开始".center(10,'*'))

****开始****
  • python中没有 switch..case语句
  • python中没有do...while语句]
  • 二分支结构 紧凑形式
<表达式1> if 条件判断语句 else <表达式2>

相关文章

网友评论

      本文标题:tips

      本文链接:https://www.haomeiwen.com/subject/mkjfqqtx.html