+ 3
What is the difference Between find( ) and index( ) in Python?
x = 'abcd' print(x.find('c')) print(x.index('c'))
3 Answers
+ 6
Quoted from https://www.w3schools.com/JUMP_LINK__&&__python__&&__JUMP_LINK/ref_string_find.asp
"The find() method is almost the same as the index() method, the only difference is that the index() method raises an exception if the value is not found."
+ 3
NonStop CODING & Ipang
Thanks đ