Assumed that it appears twice. Works for this question anyways

```
class Solution(object):
def singleNumber(self, nums):
"""
:type nums: List[int]
:rtype: int
"""
sum1 = sum(nums)
sum2 = 3*sum(list(set(nums)))
return (sum2 - sum1) / 2
```

How do i use this method but at the same time could input the frequency of that one number instead of assuming twice?