LearnPy Hub
← NumPy problems
Easy

Clip to a Range

Read integers, then lo and hi. Print np.clip(a, lo, hi).tolist().

Input

Two lines.

Output

A list.

Sample 1

Input
1 5 10 15
3 12
Output
[3, 5, 10, 12]

Sample 2

Input
0
1 2
Output
[1]
solution.py
Output appears here
Clip to a Range · Python practice problem · LearnPy Hub