Created
August 19, 2017 09:00
-
-
Save sarancruzer/6ef9f067fed6ee73f7c9f0f97fe83c8d to your computer and use it in GitHub Desktop.
i get the error when i initialize the array in python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File "/var/www/html/python/flask_movie/dbconn.py", line 35, in userRegister | |
# name = request.json['name'] | |
# company_name = request.json['company_name'] | |
# address = request.json['address'] | |
myArray = [] | |
myArray["john"] = "johns value" | |
myArray["jeff"] = "jeffs value" | |
print myArray["john"] | |
# return lists | |
TypeError: list indices must be integers, not str |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment