美文网首页
Reading Notes I:Think Python

Reading Notes I:Think Python

作者: 冬季男孩 | 来源:发表于2021-01-20 17:48 被阅读0次

在输出值的左边插入空格:

def right_justify(a):
length=len(a)
b=70-length
print (b*" "+a)

Print常用

print ('+', 4* '-' , '+', 4 * '-', '+')   #打印结果:+ ---- + ---- +

Turtle绘图

import turtle
bob = turtle.Turtle()

相关文章

网友评论

      本文标题:Reading Notes I:Think Python

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