Agentic AI - Agent Safety and Guardrails
You receive user data as a list of strings representing ages:
['25', ' 30', 'twenty', '40', '']. Which code snippet correctly validates and sanitizes this data to keep only valid positive integers?