0
Solution needed!
Not showing all outputs. What to do? Click here to see â€”ïž https://code.sololearn.com/cKQmxZxB69F3/?ref=app
10 Answers
+ 4
Now the problem solved (cheers)!
i used [ ] instead of () .. So error occured!
+ 7
Java tag is not related to question. Edit to python.
You may trying copy? It just assignment like
new_list = original_list // is this what you looking?
+ 3
Please put Python in post tags. Currently it has Java in tags, while the issue actually is related to a Python code.
+ 3
[ ] braces used for indexing.
( ) used for function call
new_list = list[original_list] #here list is a type, which is not subscriptable or indexing. so error
+ 2
maybe you mean
new_list = list(original_list)
+ 2
But my question is why type error and how to solve that?
+ 1
Mustakim Rahman Try to read the output error message.... What is say?
+ 1
It showing type error!
+ 1
Mustakim Rahman It show you the line (74) and the error ('type' object is not subscriptable).
In particular the line is:
new_list = list[original_list]
'list' is a type as str, int and dict.... And you using index on it (i dont think that is what you want)
+ 1
Mustakim Rahman The error, as previously said, is "type object is not subscriptable" because you trying to use subscription syntax on invalid type (list IS a type object not a list object)...What you dont understand?