The NBA has banned a player for life for gambling on the league.