• code works for test 5 in my environment

 

my code seems to work fine in my environment to meet the conditions of test 5, would love to know why it fails in yours.

From: https://checkio.org/mission/find-friends/solve/

HTTP_USER_AGENT:

Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Firefox/45.0
6