I am wondering how I can create an if statement that does something to a list as long as there is at least one value in the list that meets the if statement's requirements.
For example, given a list
x=[1,2,3,4,5,6,7,8,9]
y=[1,2,3,4]
z=[1,2,3,8]
I want to create an if statement where if the list contains elements whose values are between 5 and 10, then the list appends ***.
Meaning, after the if statement, the results would be
x=[1,2,3,4,5,6,7,8,9,***]
y=[1,2,3,4]
z=[1,2,3,8,***]
since both x and z contains elements that are between 5 and 10, they receive the ***.