Skip to content

Instantly share code, notes, and snippets.

@zeffii
Forked from anonymous/python_tricks_00.py
Created April 15, 2013 11:05
floatstrings = ['2.4', '6.4', '7.7', '3.2']
floats = [float(i) for i in floatstrings if float(i) > 6.2]
print(floats)
#>>> [6.4, 7.7]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment