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 -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/GKVCARNVO7S57BIO3FKZK337722ZQQSP/
Code of Conduct: http://python.org/psf/codeofconduct/