Anthropic interview question

Technical screening only in Python