Very Easy Python Solution :)


#1
class Solution:
# @param A : tuple of integers
# @param B : integer
# @return a list of integers
def searchRange(self, A, B):
    if len(A)==1 and A[0]==B:
        return [0,0]
    if B not in A:
        return [-1,-1]
    ind1 = A.index(B)
    if ind1==-1:
        return [-1,-1]
    c = list(reversed(A))
    ind2 = c.index(B)-len(A)+1
    return [ind1,abs(ind2)]