您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

除非Python中的语句

除非Python中的语句

那“不在”呢?:

if 'p4port' not in line:
    labels.append(line)

另外我想你的代码可以修改为:

if '@' in line and line == l and 'p4port' not in line:
    lineMatch = True
    labels.append(line.strip('\n').split('@')[1] + '<br>\n')
python 2022/1/1 18:49:44 有355人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶