Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save heyajulia/eecfe5693e3299f5b55538d05c2923ec to your computer and use it in GitHub Desktop.
Save heyajulia/eecfe5693e3299f5b55538d05c2923ec to your computer and use it in GitHub Desktop.
cityNames = {"New York", "Geneva", "Nairobi", "Vienna", "The Hague"}
cities = Interpreter["City"] /@ cityNames
populations = #[EntityProperty["City", "Population"]] & /@ cities
Print[NumberForm[Total[populations], DigitBlock -> 3]] (* 15,376,617 people *)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment