I can't get dictionary to work at all in Pycharm

2458 views python

I can't get dictionary functions to work in Pycharm. I know something must be wrong with my Pycharm settings, because I can run extremely simple dictionary functions and literally nothing happens, but if I use the same code in an outside console, it works as expected.

If I code this:

student = {'1': 'Bill', '2': 'Ted'}


I get this:

Process finished with exit code 0

So where is my print output?

answered question

How are you running that in PyCharm?

Did you try simply running “python your_script.py” in your terminal?

Check what you are running. Right click on your script and select run instead of just clicking run.

1 Answer


I just ran in my Pycharm its working fine and got below result:

{'1': 'Bill', '2': 'Ted'}

Process finished with exit code 0


I think you are just missing 1st line of result which comes right after the path your running python file. Check again. I used: Python 3.5 and Community version of Pycharm.

posted this

Have an answer?


Please login first before posting an answer.