#JavaScript (ES6) 65 bytes a=(t,s)=>t.split("\n").filter(i=>i.split(' ')[0]==s)[0].slice(-2) Usage: stats = "Alabama 19\nWyoming 3\n"; // Or more a(stats, "Wyoming"); Will return "19" for Alabama and " 3" for Wyoming, with an extra space