0
Stuck on python question
I am stuck on a problem on beginner python problem for string functions, the problem is as follows Fill in the blanks to output the second word of the given string 'x'. words = x.split(' ') res = words[] print(res) I already answered the first two problems but I need to know what to for the words[]
2 ответов
+ 1
It's indexing. You need to put the index of the second value of the list into the brackets.
Hint: indexing starts at 0
0
words = x.split(' ')
res = words[1]
print (res)
This will print the second word of the string 'x'.