Shashank and List

  • + 1 comment
    m = 1000000007
    result = 1
    
    for i in range(len(a)):
        result = result * (1+pow(2,a[i],m))
    result = result-1
    
    return int(result%m)