On 04/01/2016 21:54, Bod Soutar via Tutor wrote:
On 4 January 2016 at 19:50, Mark Lawrence

Three reasons for why it's better but it doesn't actually work as given.

island = "Isle Of Wight"
new = "Isle of Wong"
print("You've visited {0} & {2}.".format(island, new))
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
IndexError: tuple index out of range

--

Have you tried with {0} and {1}?

No, it would not have occurred to me without asking here first.

--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to