Skip to content

Instantly share code, notes, and snippets.

@junetech
Created October 1, 2024 05:01
Show Gist options
  • Save junetech/2f5ea05b9c3855e2e5f2988e60904baf to your computer and use it in GitHub Desktop.
Save junetech/2f5ea05b9c3855e2e5f2988e60904baf to your computer and use it in GitHub Desktop.
Python subset test
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