```
class Solution(object):
def searchRange(self, nums, target):
"""
:type nums: List[int]
:type target: int
:rtype: List[int]
"""
a={}
if len(nums)==0:
return [-1,-1]
for i in range(len(nums)):
if nums[i]==target:
a[i]=i
b=a.keys()
b.sort()
if len(b)>0:
return [b[0],b[-1]]
else:
return [-1,-1]
```