7/13 Investing Stock | "Apple = 0" is a syntax error?


#1

[][] Code [][]

    prices = {
    "banana": 4,
    "apple": 2,
    "orange": 1.5,
    "pear": 3
}


stock = {
    "banana": 6
    "apple": 0
    "orange": 32
    "pear": 15
}

PROBLEM : when submitted to console :-

File "python", line 11
"apple": 0
^
SyntaxError: invalid syntax

2nd PROBLEM : Codeacademy gives me this error :

Oops, try again. Did you remember to create a dictionary called stock?

help with explanation and correct code please?


#2

NVM Found the reason

if anybody needs it

prices = {
"banana": 4,
"apple": 2,
"orange": 1.5,
"pear": 3
}

stock = {
"banana": 6,
"apple": 0,
"orange": 32,
"pear": 15
}


#3

Problem is in absent commas.