相关文章推荐
重感情的包子  ·  如何基于BucketPolicy实现跨部门数 ...·  8 月前    · 
咆哮的黑框眼镜  ·  vue 获取当前时间戳 + 4位随机数 - ...·  1 年前    · 
气宇轩昂的领带  ·  梁强院长应邀出席“一带一路”倡议十周年研讨会 ...·  1 年前    · 
冷冷的麦片  ·  python虎扑社区论坛数据爬虫分析报告 - 掘金·  2 年前    · 
俊秀的花卷  ·  git ...·  2 年前    · 
Code  ›  Python报错TypeError: '<' not supported between instances of 'str' and 'int'开发者社区
python bet
https://cloud.tencent.com/developer/article/1781297
旅行中的红茶
2 年前
作者头像
BH8ANK
0 篇文章

Python报错TypeError: '<' not supported between instances of 'str' and 'int'

前往专栏
腾讯云
备案 控制台
开发者社区
学习
实践
活动
专区
工具
TVP
文章/答案/技术大牛
写文章
社区首页 > 专栏 > 云技术分享 > 正文

Python报错TypeError: '<' not supported between instances of 'str' and 'int'

发布 于 2021-01-28 20:37:20
3.3K 0
举报
1 n = input()
2 if n>=100:print(int(n)/10)
3 else:print(int(n)*10)

报错内容:

Traceback (most recent call last):
  File "1.py", line 12, in <module>
    if n>=100:print(int(n)/10)
TypeError: '>=' not supported between instances of 'str' and 'int'
 
推荐文章
重感情的包子  ·  如何基于BucketPolicy实现跨部门数据共享_对象存储(OSS)-阿里云帮助中心
8 月前
咆哮的黑框眼镜  ·  vue 获取当前时间戳 + 4位随机数 - CSDN文库
1 年前
气宇轩昂的领带  ·  梁强院长应邀出席“一带一路”倡议十周年研讨会、海外华人企业可持续性发展高峰论坛-汕头大学商学院
1 年前
冷冷的麦片  ·  python虎扑社区论坛数据爬虫分析报告 - 掘金
2 年前
俊秀的花卷  ·  git cherry-pick概念及冲突解决 - 知乎
2 年前
今天看啥   ·   Py中国   ·   codingpro   ·   小百科   ·   link之家   ·   卧龙AI搜索
删除内容请联系邮箱 2879853325@qq.com
Code - 代码工具平台
© 2024 ~ 沪ICP备11025650号