xxxxxxxxxx
# user data entered as name and phone number
user_data = "Elvis Presley 987-654-3210"
phone_number = [ x for x in user_data if x.isdigit()]
print(phone_number)
xxxxxxxxxx
print([x * 2 for x in range(10) if x % 2 == 0]) # [0, 4, 8, 12, 16]
xxxxxxxxxx
# open the file in read-only mode
file = open("dreams.txt", 'r')
poem = [ line for line in file ]
for line in poem:
print(line)