Python 3 fails and I can't see why.
in Programming
dic.get([words[1], 0])
on your 5th line should be
dic.get(words[1], 0)
Instead of calling get with 2 arguments: the key to use (words[1]) and the default value if the key is not found (0), you are calling get with one argument: a new list with these 2 elements. Python tries to use it as a key, but it fails, which is what it's complaining about.
-
Featured Topics
-
Topics
-
coolbean28 ·
Posted in Graphics Cards0 -
awsomename999 ·
Posted in Troubleshooting1 -
RoyTheGeek ·
Posted in Phones and Tablets1 -
NexDeformedpoto ·
Posted in Networking1 -
3
-
6
-
2
-
Soapy1234 ·
Posted in CPUs, Motherboards, and Memory3 -
tridy ·
Posted in Programs, Apps and Websites2 -
Gabrielzv1233x2 ·
Posted in Troubleshooting4
-
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now