Created
October 1, 2024 05:01
-
-
Save junetech/2f5ea05b9c3855e2e5f2988e60904baf to your computer and use it in GitHub Desktop.
Python subset test
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
import numpy as np | |
set1 = {np.str_("a"), "b"} | |
set2 = frozenset({"a", "b"}) | |
print(set1.issubset(set2)) # True | |
print(set2.issubset(set1)) # True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment