作者:尚福惠珠綺裕 | 来源:互联网 | 2023-06-23 18:13
inthePygLatin1011exerciseontheCodecademyPythoncourse,ihavetodothefollowing:在关于Codec
in the PygLatin 10/11 exercise on the Codecademy Python course, i have to do the following:
在关于Codecademy Python课程的PygLatin 10/11练习中,我必须做以下事情:
Set new_word equal to the slice from the 1st index all the way to the end of new_word. Use [1:len(new_word)] to do this.
将new_word设置为等于从第一个索引一直到new_word结尾的切片。使用[1:len(new_word)]执行此操作。
And I receive the following error:
我收到以下错误:
File "python", line 9
new_word = [1:len(new_word)]
^
SyntaxError: invalid syntax
And this is the code:
这是代码:
File "python", line 9
new_word = [1:len(new_word)]
^
SyntaxError: invalid syntax
Here you will find screenshots which might be of help:
在这里,您将找到可能有帮助的屏幕截图:
This might be a very stupid question, but I really want to understand where I am wrong with this, soIi don't make the same mistake in the future. Thanks for the help in advance.
这可能是一个非常愚蠢的问题,但我真的想知道我错在哪里,所以我不会在将来犯同样的错误。我在这里先向您的帮助表示感谢。
4 个解决方案