Sep-30-2019, 06:43 PM
(Sep-30-2019, 06:41 PM)stullis Wrote: It isn't clear what you're trying to accomplish. students[...] suggests slicing a sequence named "students", but you can't use a list comprehension for that. Please clarify the objective and the data types/structures at play.
Also, line two does not need range(len()). You can just use the iterable in Python.
for i in keyIDs: ...
Thanks, instead of 'students' I was meant to put 'jsonData'. I'm trying to do this with comprehensions instead of using for loops.