Easy
readlines() as a List
Read n and n words. Write each word on its own line to
w.txt. Then read the file with readlines(), strip each line and print the list.Input
n, then n lines.
Output
A Python list.
Sample 1
Input
3 a b c
Output
['a', 'b', 'c']
Sample 2
Input
1 hello
Output
['hello']
Output appears here