The list comprehension starts with a ‘[‘ and ‘]’, square brackets, to help you remember that the result is going to be a list.
[ expression for item in list if conditional ]
for item in list:
if conditional:
expression
string = "Hello 12345 World"
numbers = [x for x in string if x.isdigit()]
print numbers
>> ['1', '2', '3', '4', '5']