`# Late last night`
`def is_in_list(x, term):`
` try:`
` x.index(term)`
` return True`
` except ValueError:`
` return False`
`# The next morning`
`def is_in_list(x, term):`
` return term in x # facepalms`
Anyone else ever do this? Don’t code late; get some rest and do it in the morning. #programming #python