TypeError: ‘builtin_function_or_method’ object has no attribute ‘__getitem__’

The problem is that index is a method and needs to be called with () not []. To use Kasra’s example:

>>> s="aeer"
>>> s.index('a')
0

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)