str.index() and str.find() versus only list.index()

Roel Schroeven roel at
Mon Jul 13 18:56:33 CEST 2015


Quick question: why does str have both index() and find(), while list 
only has index()? Is there a reason for that, or is it just an 
historical accident?

Best regards,

The saddest aspect of life right now is that science gathers knowledge
faster than society gathers wisdom.
   -- Isaac Asimov

Roel Schroeven

More information about the Python-list mailing list