-1

I am a amature in Python,using the python33 version.The problem i am facing while i want to get output of a list of dictionary just like that.

dict = {'name':'Tanvir','Position':'Programmer'};
print dict['name'];

if i run the code then there showing a syntax error.same thing is happening for the list also. Please help me to fix the problem.

Thanks in advance.

zogo
  • 495
  • 3
  • 10
  • 24

1 Answers1

2

In Python 3, print is a function, so you need print(dict[name]). You also don't need the semicolons. You also need to read the Python tutorial to learn the basics first.

BrenBarn
  • 242,874
  • 37
  • 412
  • 384