python filter
ages = [5, 12, 17, 18, 24, 32]
def myFunc(x):
if x < 18:
return False
else:
return True
adults = filter(myFunc, ages)
for x in adults:
print(x) # 18 24 32
python filter
ages = [5, 12, 17, 18, 24, 32]
def myFunc(x):
if x < 18:
return False
else:
return True
adults = filter(myFunc, ages)
for x in adults:
print(x) # 18 24 32
filtrar en python/how to filter in python
method number orbital_period mass distance year
0 Radial Velocity 1 269.30 7.10 77.40 2006
2 Radial Velocity 1 763.00 2.60 19.84 2011
3 Radial Velocity 1 326.03 19.40 110.62 2007
6 Radial Velocity 1 1773.40 4.64 18.15 2002
7 Radial Velocity 1 798.50 NaN 21.41 1996
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us