xxxxxxxxxx
with open("ataraxia.py", "r") as file:
for line_number, line in enumerate(file):
print("line ", line_number, ": ", line)
xxxxxxxxxx
for line in wallop_of_a_string_with_many_lines.split('\n'):
#do_something..
xxxxxxxxxx
>>> x = [1, 2, 3, 4, 5]
>>> y = [2*a for a in x if a % 2 == 1]
>>> print(y)
[2, 6, 10]