简体   繁体   English

Python 3 列表语法错误

[英]Python 3 List Syntax Error

I'm still on the process of learning python and recently I started working on a scrip where I created this very long list:我仍在学习 python 的过程中,最近我开始编写一个脚本,在那里我创建了这个很长的列表:

non = ["Hello","Hey","Hi","Greetings","My","Ok","You","He","She","It",
       "They","Our","Mine","Your","Tomorow","Today","If","For"]
print(non)

When I try to run the script it gives me a syntax error on the item "They".当我尝试运行脚本时,它在“他们”项上给了我一个语法错误。

**"The**y",

Thanks in advance for any help :)在此先感谢您的帮助:)

@Fargo...if you run the script in this format it will give you a multiline error the proper way to write the code is given in the image link...hope it wiil be useful ... and here is your output - @Fargo...如果你以这种格式运行脚本,它会给你一个多行错误图像链接中给出了编写代码的正确方法......希望它有用......这是你的输出 -

https://i.stack.imgur.com/dqPMH.png https://i.stack.imgur.com/dqPMH.png

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM