how to get the list form dictionary's values
Peter Otten
__peter__ at web.de
Sun Feb 21 09:06:55 EST 2016
davidbenny2000 at gmail.com wrote:
> File "mainpy.py", line 81
> for functionlistelement in functionlist0
> ^
> SyntaxError: invalid syntax
>
>
> import asyncio
[snip]
> mappedfunc = {}
> functionlist000 = []
> functionlist001 = []
> functionlist002 = []
> functionlist003 = []
> functionlist004 = []
[snip many names with numeric suffix and repeated method calls]
I have no idea what you are trying to do; however, your code looks awfully
redundant. This is errorprone:
functionkey000 = {'000': f000 }
functionkey001 = {'001': f001 }
functionkey002 = {'002': f002 }
functionkey002 = {'003': f003 }
functionkey002 = {'004': f004 }
> for functionlistelement in functionlist0
To answer what seems to be your actual question: a colon is missing at the
end of this line.
More information about the Python-list
mailing list