<doocs>2367.Number of Arithmetic Triplets_1.py
def arithmeticTriplets( nums: List[int], diff: int) -> int:
    s = set(nums)
    return sum(v + diff in s and v + diff + diff in s for v in nums)
def sample_funcname ( var_0 : List [ int ] , var_3 : int ) -> int :
    var_5 = set ( var_0 )
    return sum ( var_7 + var_3 in var_5 and var_7 + var_3 + var_3 in var_5 for var_7 in var_0 )
