Python error prompt: typeerror: ‘builtin’_ function_ or_ method‘ object is not subscriptable

[]

)

>>> yy.replace['a','s']
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'builtin_function_or_method' object is not subscriptable
>>> yy.replace('a','s')
'sbcdef'
>>>

Read More: