def greeting(userid): return 'Hi %s!' % name_for_userid.get(userid, 'there')