1 2 3 4 5 6 7 8 9 10 | import numpy as np x = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]) # ÀÌ ¹è¿¿¡¼ °ªÀÌ 3ÀÇ ¹è¼öÀÎ °ªÀ» ÃßÃâÇ϶ó. print(x[x % 3 == 0]) # ÀÌ ¹è¿¿¡¼ °ªÀÌ 4·Î ³ª´©¸é 1ÀÌ ³²´Â ¼ö¸¦ ÃßÃâÇ϶ó. print(x[x % 4 == 1]) # ÀÌ ¹è¿¿¡¼ °ªÀÌ 3À¸·Î ³ª´©¸é ³ª´©¾îÁö°í 4·Î ³ª´©¸é 1ÀÌ ³²´Â ¼ö¸¦ ÃßÃâÇ϶ó. print(x[(x % 3 == 0) & (x % 4 == 1)]) | cs |