On 30/01/21 3:27 am, Francis O'Hara Aidoo wrote:
listy = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] if listy.index(10) == -1: print("Monty Python")
> Although ambiguity will make it difficult to implement, The difficulty isn't just with implementation, it's with *specification*. How is it supposed to know when you want a negative index without reading your mind? -- Greg _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/GKVCARNVO7S57BIO3FKZK337722ZQQSP/ Code of Conduct: http://python.org/psf/codeofconduct/