Reading Notes I:Think Python

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

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)