Python - Syntax Error On Colon In List
I've been trying to create a simple dictionary to define a word that the user inputs. After defining the dictionary and it's words, I'm trying to print the definition of the input'
Solution 1:
You forgot a comma at the end of each entry in the dict. Dicts use curly braces "{...}"
dic1 = {
    'bug':'A broken piece of code that causes a program to stop functioning',
    'string':'A piece of text',
    'integer':'A whole number',
    'float':'A decimal number',
    'function':'A block of organized and clean code that performs a task/action',
    'syntax':'A set of rules that says how a program will be coded',      
    }
Post a Comment for "Python - Syntax Error On Colon In List"