Python注释缩进不得当导致IndentationError: unexpected indent
def test():i=0 ''' aaaaaa '''while i < 5:'''bbbbbb''' print(i)i+=1if __name__ == '__main__':test()
如上,Python注释的缩进不得当,也会导致IndentationError: unexpected indent。将注释的缩略修改如下后解决。
def test():i=0'''aaaaaa'''while i < 5:'''bbbbbb''' print(i)i+=1if __name__ == '__main__':test()
转载于:https://www.cnblogs.com/shouzhenghouchuqi/p/10585513.html
Python注释缩进不得当导致IndentationError: unexpected indent相关推荐
- 【python :编译错误】 IndentationError:unexpected indent(缩进问题)
转载:python :脚本运行出现语法错误:IndentationError:unexpected indent(缩进问题) 转载:TRACEING [问题] 一个python脚本,本来都运行好好的 ...
- Python中报错:IndentationError: unexpected indent的原因分析和解决方法
Python中报错:"IndentationError: unexpected indent"的原因分析和解决方法 "IndentationError: unexpect ...
- Python:IndentationError: unexpected indent
python遇到错误:IndentationError: unexpected indent解决办法:python因为是根据格式缩进来识别逻辑块的,所以对格式要求极为严格,出现上述错误,一般都是tab ...
- IndentationError: expected an indented block --python报错 or IndentationError:unexpected indent
https://blog.csdn.net/hanhanwanghaha宝藏女孩 欢迎您的关注! 欢迎关注微信公众号:宝藏女孩的成长日记 让这个可爱的宝藏女孩在努力的道路上与你一起同行! 如有转载,请 ...
- python:IndentationError: unexpected indent 问题解决 图文说明
转自:https://www.cnblogs.com/gary-bao/p/5142102.html Python脚本运行出现语法错误:IndentationError:unexpected inde ...
- Python编译时提示错误IndentationError: unexpected indent
新手小白刚开始学习Python,尝试想打印一句话,运行时提示 第19行 有个错误 IndentationError: unexpected indent print('a') 如上所示,indenta ...
- python IndentationError: unexpected indent
1 问题描述 程序运行时候出现:IndentationError: unexpected indent报错. 2 解决方案--缩进问题 python对缩进要求异常的严格,比如你删除了某一个语句,或者往 ...
- IndentationError: unexpected indent python
在CentOS 6.3 64bit上一个没有配置好的vim中,修改了一个python脚本,运行时就反复报错,说 IndentationError: unexpected indent python 怎 ...
- python报“IndentationError: unexpected indent“的解决方法
python报"IndentationError: unexpected indent"的解决方法 参考文章: (1)python报"IndentationError: ...
最新文章
- NC45实现二叉树先序、中序和后序遍历
- 一个通俗易懂的HMM例子
- 用文本指导文本:基于文本的自监督可控文本生成模型
- 20分钟教你手写Sping MVC
- c语言 题目 猜算式,蓝桥杯竞赛题目(猜算式)
- Python os模块相关简介
- Facebook全球宕机6小时!小扎损失60亿,15亿用户数据被出售
- 事件CEvent的使用
- php 指定域名的cookie,php如何设置cookie对整个域名有效?
- python编程(改进的线程同步方式)
- Windows程式开发设计指南--视窗和讯息
- 为什么要学习数据结构和算法?
- 一个由服务器时区引发的Bug
- 不同测序数据应用与基因组组装|Canu
- linux 打开三维stl文件,三维stl文件查看工具下载
- Markdown笔记利器:Typora主题-最美的模板
- 我做的一个java简单文本编辑器代码
- 跬智信息(Kyligence)荣获浦东新区人工智能创新应用大赛一等奖
- shineblink APDS-9960传感器感应手势
- 2017 php经典面试题,2017最新PHP经典面试题目汇总(上篇)
热门文章
- Python中常见的语法糖
- 电脑无法连接到系统服务器,请问怎么客户端的电脑连接不到服务器?这是什么原因?...
- STM32启动文件代码解析
- python抓虫_Python 七步捉虫法
- ubuntu docker慢_基于docker搭建MulVAL攻击图
- 用python批量创建docker_「docker实战篇」python的docker-docker镜像的创建使用dockerfile(3...
- docker和虚拟机的区别_详解win7操作系统下安装部署Docker环境
- 容器可以作为全局变量吗_四季青是风水树吗?哪些可以作为风水树?
- Python识别表格图_使用Python究竟可以做什么?下面是Python的3个主要应用
- android 手动签名apk,记录手动签名APK的过程