Predict the outputExercise 1/6Elementary20 XP
Write, then read
Task
Without running the program, write exactly what it prints.
with open("data.txt", "w") as f:
f.write("jeden\ndva\n")
with open("data.txt") as f:
riadky = f.readlines()
print(len(riadky))
print(riadky[1].strip())
You need to know
Your answer
Put each printed line on its own line.
Hints
Try it yourself first. Each hint reveals a little more - and lowers the reward a little.
Signed out, hints are free - but no XP is awarded either.
Solution
The solution unlocks after the last hint.