0
How can i find greater numbers in a list than one other number?
If i have a list with some numbers ill need to print the numbers that are greater than 10 or 5.
2 Respostas
+ 4
Assuming you want to do it with Python ( as you talk about 'list' ):
list = [ 42, 5, 80, 127, 3]
for x in list:
if x > 5 or x > 10: # but unnecessary: if x>10, then x>5 ;)
print(str(x)+' is greater than 5 or 10')
+ 2
In which language?