Answer $\left[1-\frac{\sqrt{2}}{2}, 1\right]$.
Analysis $\overrightarrow{A P}=\lambda \overrightarrow{A B} \Rightarrow \overrightarrow{O P}=(1-\lambda) \overrightarrow{O A}+\lambda \overrightarrow{O B}=(1-\lambda, \lambda)$, then $\overrightarrow{P B}=(\lambda-1,1-\lambda), \overrightarrow{P A}=(\lambda,-\lambda)$,
$$
\overrightarrow{O P} \cdot \overrightarrow{A B} \geq \overrightarrow{P A} \cdot \overrightarrow{P B} \Leftrightarrow(1-\lambda, \lambda) \cdot(-1,1) \geq(\lambda,-\lambda) \cdot(\lambda-1,1-\lambda) \Rightarrow 2 \lambda^{2}-4 \lambda+1 \leq 0
$$

Solving gives $1-\frac{\sqrt{2}}{2} \leq \lambda \leq 1+\frac{\sqrt{2}}{2}$, since point $P$ is a moving point on line segment $A B$, so $0 \leq \lambda \leq 1$. In summary, the range of $\lambda$ that satisfies the condition is $1-\frac{\sqrt{2}}{2} \leq \lambda \leq 1$.
3. Let $O(0,0), A(1,0), B(0,1)$, point $P$ is a moving point on line segment $AB$, $\overrightarrow{A P}=\lambda \overrightarrow{A B}$, if $\overrightarrow{O P} \cdot \overrightarrow{A B} \geq \overrightarrow{P A} \cdot \overrightarrow{P B}$, then the range of the real number $\lambda$ is