I used the find attribute and got
a='dog'
a.find( 'og')
result is 1
a.find('k')
result is -1
Which makes sense -1 means doesn't contain the character 1 means it
does, but when I use it the find attribute for numbers and anything
with a dash in it, I get a value greater than 1.
b= 'dog-cat'
b.find( 'at')
result is 5
'dog-cat'.find( 'at')
result is 5
'2008-2009'.find( '2009')
result is 5
num='2008-2009'
num.find( '2009')
result is 5
num.find( '32')
result is -1
Why do I get a value greater than 1 when the character is found but
only a -1 when the value is not.
Also, I getting 0 when the character are within the string? Am I doing
something wrong or is this an issue with Python.
'2008-2009'.find( '20')
result is 0
'2008-2009'.find( '2')
result is 0
num.find( '2')
result is 0
num.find( '20')
result is 0
--
http://groups.google.com/group/python_inside_maya