Austin_zhai
Austin_zhai
题解
题解 | #判断列表是否为空#
全部文章
题解
归档
标签
去牛客网
登录
/
注册
题解 | #判断列表是否为空#
360 浏览
0 回复
2022-06-23
Austin_zhai
+关注
判断列表是否为空
http://www.nowcoder.com/practice/83602ea86f1e4e6ca42d5ebffff34ca8
创建空列表并判断列表是否为空
my_list = [] if not my_list: print('my_list is empty!') else: print('my_list is not empty!')
Python3
举报
收藏
赞
评论加载中...