Type cating and lists comprehension


I don`t understand the error .Please explain.