0

Mistake

There is a mistake: words [0] is "Hello," , not "Hello".

22nd Oct 2017, 2:58 PM
Иван Ильичев
Иван Ильичев - avatar
5 Respostas
+ 5
(It's from Python course > Control Structures > Lists > first page) words = ["Hello", "world", "!"] print(words[0]) print(words[1]) print(words[2]) words[0] is 'Hello' not 'Hello,' because the comma is a list separator and not part of the string, as it's outside the quotation marks.
17th Dec 2017, 8:54 AM
David Ashton
David Ashton - avatar
+ 4
@Erik Johanson ... I think this is from the Python Lessons. When posts end up out in Q&A often the only context is the keywords :/
22nd Oct 2017, 4:09 PM
Kirk Schafer
Kirk Schafer - avatar
+ 3
Could be a translation typo; English looks okay. Menu | Feedback should get their attention :)
22nd Oct 2017, 3:04 PM
Kirk Schafer
Kirk Schafer - avatar
+ 1
yup, ama noobie here, so i thought i comented the task
22nd Oct 2017, 6:07 PM
Иван Ильичев
Иван Ильичев - avatar
0
I assume you called a function thes that splits a string into words. The function that does that very likely separates the string into words by spaces. Spaces are the key thing here.
22nd Oct 2017, 3:10 PM
Erik Johanson
Erik Johanson - avatar