79676704

Date: 2025-06-23 20:07:18
Score: 0.5
Natty:
Report link

If you define string as a variable containing an actual string, either as a function argument or in your main program, your code should work, though, as LMC says, don't use it as a variable name. My guess is here you forgot to define it or it's not accessible in your function or something. Normally that would result in a NameError, but since string is defined as a built-in, it instead throws the AttributeError.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: Boom