Comment The real way to get some head and tail (Score 2, Informative) 371
Not to nitpick but the correct way to reference the head and tail of a list in Python is as follows:
head = list[0]
tail = list[-1]
Please don't defile this beautiful language by posting incorrect code snippets.