LearnPy Hub
← Context Managers problems
Easy

Append With with

Create list.txt containing first. Then use with open('list.txt', 'a') to add each input word on its own line. Print the file contents.

Input

Words separated by spaces.

Output

Several lines.

Sample 1

Input
second third
Output
first
second
third

Sample 2

Input
x
Output
first
x
solution.py
Output appears here
Append With with · Python practice problem · LearnPy Hub