天天看点

python3 turtle使用报错,代码没有对齐

今天在看一个Python3的视频教程,教大家画五角星,

在Console中

>>>import turtle

>>>turtle.forward(100)

>>>turtle.left(144)

出来了一个五角星

copy到ide的.py文件中

import turtle

    turtle.forward(100)

    turtle.left(144)

保存,运行,

竟然提示:

IndentationError: unexpected indent

没有对齐!

居然python3 要求有这么严格!删除前面的tab,才可以正常运行

     本文转自lisiyun22 51CTO博客,原文链接:http://blog.51cto.com/lisiyun/1983493,如需转载请自行联系原作者