```
from bisect import bisect_left, bisect_right
def searchRange(nums, target):
left = bisect_left(nums, target)
if left >= len(nums) or nums[left] != target:
left = -1
right = bisect_right(nums, target) - 1
if right < 0 or nums[right] != target:
right = -1
return [left, right]
```

Making use of https://docs.python.org/2/library/bisect.html for fast binary search.