Improving efficiency of Project Euler 185 (16-place Mastermind)
Expressiveness


What does prob(a,n) mean?  How about apply_constraint(guess, n_correct) instead?
Why do you reinvent xrange() (Python 2) or range() (Python 3)?
number is a global variable, which makes the code hard to follow.
number is an iterable of numbers, but your constraints are given as characters, which makes comparisons awkward.
temp is an uninformative name for a variable.  It's especially bad when you return temp — that implies that it's not very temporary at all.
Parsing the input is better done using a regular expression.


Strategy

Let \$p\$ be the number of positions (16 in the real problem, 5 in the test case).
Let \$g\$ be the number of guesses (22 in the real problem, 6 in the test case).

The outline of prob() is:

for j in number:
    for i in newCombos:
        …
        [… for l in range(len(newCombos.values()))]


number is \$O(10^p)\$ (the number of candidate solutions you initially generate).

newCombos has \$\left(\begin{array}{c}p\\c\end{array}\right) = \dfrac{p!}{c!\ (p - c)!}\$ combinations, each of which has \$c\$ values, where \$c\$ is the number of correct guesses within that constraint.

If we estimate that \$c = 3\$, then the complexity of your solution is \$O(10^p p^3g)\$ in time.  The maximum space needed is the number candidates remaining after processing the first constraint, or \$O(\left(\begin{array}{c}p\\c\end{array}\right))\$.

I'm not sure that I analyzed the complexity completely correctly, but in any case those bounds are crazy.  Your strategy of enumerating all the possibilities just doesn't scale.  It's as if you were trying to solve a sudoku puzzle by generating all possible solutions first.