lambda s:[i['user_id']for i in get('http://api.stackexchange.com/users?inname=%s&site=codegolf'%utils.quote(s)).json()['items']if i['display_name']==s]
from requests import*
샘플 런
>>> f=\
... lambda s:[i['user_id']for i in get('http://api.stackexchange.com/users?inname=%s&site=codegolf'%utils.quote(s)).json()['items']if i['display_name']==s]
>>> from requests import*
>>>
>>> tests = ['musicman523', 'Dennis', 'xnor', 'Leaky Nun', 'Community', 'Any user that does not exist', 'Alex', 'Leaky N', 'Jorge']
>>> for i in tests: print '%-30r -> %s'%(i, f(i))
...
'musicman523' -> [69054]
'Dennis' -> [12012, 13891, 14912, 24937]
'xnor' -> [20260]
'Leaky Nun' -> [48934]
'Community' -> [-1]
'Any user that does not exist' -> []
'Alex' -> [21536, 69198, 11192]
'Leaky N' -> []
'Jorge' -> [3716]
재미있는 사실 : 결과는 평판에 따라 정렬됩니다.