51245/python-error-typeerror-string-indices-must-integers-not-str
I'm getting the following python error:
File "em_sep.py", line 13, in <module> if ema_1["confidence_score"] == "50": TypeError: string indices must be integers, not str
Line 13 of the the code:
email_s.append(email_1["email_address"])
Hey @Dipti
This is the list on which the iterator runs on and you tried changing it during the iteration. Use another list for appending. That shouldn't come in the way of iterating.
Hope this will help!
If you need to know more about Python, join Python certification course online today.
Thanks!
In fact, I get a perfectly good ...READ MORE
Hi, @Varshap It’s a TypeError, which tells us ...READ MORE
Hi@akhtar, As we know that the index of ...READ MORE
Hi, @Shabaj, Regarding your query, I hope this ...READ MORE
You can also use the random library's ...READ MORE
Syntax : list. count(value) Code: colors = ['red', 'green', ...READ MORE
Enumerate() method adds a counter to an ...READ MORE
You can simply the built-in function in ...READ MORE
Hey @Ashish, change the emotion_map to the ...READ MORE
Try installing libpng You can do it with ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.