LeetCode771.宝石与石头

Python初学,画风难免清奇……

class Solution(object):
    def numJewelsInStones(self, J, S):
        count = 0
        for j in J :
            for s in S :
                if j == s :
                    count = count + 1
        return count

原文地址:https://www.cnblogs.com/ldgforever/p/9839807.html