diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 09a44454..63a20b08 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -440,6 +440,11 @@ Place: Nigeria
Coding Experience: Python and javaScript.
Email: tolubarca01@gmail.com
+Name: [Amanda Bertsch](https://github.com/abertsch72)
+Place: Arizona, USA
+Coding Experience: Python, C, Java, SQL.
+Email: abertsch72@gmail.com
+ Name: [Abhishek Singh](https://github.com/n6wbi6)
Place: India
Coding Experience: 2 years of coding experience in C and python.
diff --git a/python/unique/abertsch72_unique_strings_in_nested_lists.py b/python/unique/abertsch72_unique_strings_in_nested_lists.py new file mode 100644 index 00000000..8ff364a7 --- /dev/null +++ b/python/unique/abertsch72_unique_strings_in_nested_lists.py @@ -0,0 +1,7 @@ +seqs = [["a","b","c"],["a","d","e","f"],["y","a"],["a","a","a","a"], ["A"]] + +print(len(set([name for seq in seqs for name in seq]))) + +# Testing +testseqs = [["a","b","c"],["a","d","e","f"],["y","a"],["a","a","a","a"], ["A"]] +assert (len(set([name for seq in testseqs for name in seq])) == 8)