Skip to content

Instantly share code, notes, and snippets.

@River2056
Created September 16, 2020 05:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save River2056/ecca1aae3d87e20028c131f7a4754dea to your computer and use it in GitHub Desktop.
Save River2056/ecca1aae3d87e20028c131f7a4754dea to your computer and use it in GitHub Desktop.
result = [student_names[i] for i in range(len(is_absent)) if not is_absent[i]]
print(result) # 輸出['John', 'Leon', 'Jill']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment