;)

In [29]: s = 'bannab'

In [30]: a = np.frombuffer(s.lower(), dtype='uint8')

In [31]: np.all(a ==  a[::-1])
Out[31]: True

In [32]: s = 'bannac'

In [33]: a = np.frombuffer(s.lower(), dtype='uint8')

In [34]: np.all(a ==  a[::-1])
Out[34]: False
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to