I am trying to print selected values from a list on one line in python 3.
Here is the code:
names = ['dog', 'house', 'in', 'is', 'the']
print (names [0])
prints result = dog
What I want to be able to do is to add list value index 2 so that the result would be = dog in
.
And that it prints on one line.
I tried searching online and here but could not find a solution.