Created
April 27, 2020 22:21
-
-
Save ashitaka1963/c65c1a8d474d9156d48d6a6fa007558d to your computer and use it in GitHub Desktop.
リストの重複削除
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
list = [1, 1, 2, 3, 3, 4] | |
print(set(list)) # {1, 2, 3, 4} | |
print(len(set(list))) # 4 | |
# 参考 | |
# [配列の重複を削除・抽出する|Python - suzu6](https://www.suzu6.net/posts/97-python-duplication/) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment