Python Error In Comprehensions List But Correct In For Loop Stack

Python Error In Comprehensions List But Correct In For Loop Stack