Category: Indian Hindi-language filmsQ:
How to get a list of URLs from a Dictionary
I have a dictionary containing keys, the key is the URL of a website, and the value is the number of times that this URL is in the list.
d = {'google.com':2,'twitter.com':1,'youtube.com':3}
I want to display a list with all the URLs and their number of times.
A:
import itertools
itertools.product(*d.values())
A:
for k, v in d.iteritems():
print k, v
There's no reason to create an empty list then append elements to it.
You can also use:
for k, v in d.iteritems():
print "%s: %d" % (k, v)
Commentary
Gladstone’s Risk Management
Ronnie Gladstone, director, risk management
For all its corporate bravado, the global financial crisis has reminded us of just how vulnerable we are. It has demonstrated the fragility of today’s financial system and its tendency to get caught up in cycles of boom and bust.
Concerned by the impact of the financial crisis and its lasting implications, regulators, the market and the public are now looking for ways to make the financial system safer and more resilient.
In the past, the resilience of our financial system has been reflected in the size and strength of our banks. That is changing, and some of the ways in which financial institutions are strengthening their risk management may surprise you.
Governing the risks
The UK’s financial regulators have agreed that central bankers will take the lead on regulating the risks that banks take. Risk management departments, meanwhile, are taking a more forward-looking approach in terms of their planning.
This approach is beginning to change how banks manage their risk. Central bankers in the US and the UK are looking at new ways to consider systemic risks, such as the impact that financial institutions could have on others in the economy.
The Centre for Financial Stability and the UK’s Financial Services Authority have both begun publishing annual reports on the risks that institutions pose to the rest of the economy. In Europe, the European Banking Authority is also looking at bank stability through its regulatory framework for supervising individual banks. ac619d1d87
Related links:
Comments