Detect Html Tags Hackerrank Solution Python