top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

What are Python's dictionaries?

+1 vote

How will you create a dictionary in python?
How will you get all the keys from the dictionary?
How will you get all the values from the dictionary?

posted Sep 15, 2017 by Jdk

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

Is it possible to have a default dictionary where the default is dependent on the key?

I was hoping something like this might work:

>>> m = defaultdict(lambda key: key+1)

But it obviously doesn't:

>>> m[3]

Traceback (most recent call last):

 File "", line 1, in 
TypeError: () takes exactly 1 argument (0 given)
+1 vote

Whenever I run the Leo editor (a Python application) from Windows (8.1), there is always an event log window in the background. I want to turn it off.

It was suggested to me on another forum that I use pythonw.exe instead of python.exe to prevent the window from being displayed, but I don't know how to do this, because it is all automatic: I just click on the .py file, and the python interpreter is automatically loaded.

Could someone please tell me how to disable the event log window?

+2 votes

What are the best practices to reduce bugs caused by Python's dynamic data-type characteristic? Can Python programmers here advise?

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.