I've got a question how to add the words to list without that "\n" symbol.
Having a file where are words e.g.:
GCC
GNU
gcc
project
and
compiler
Only
the
most
useful
options
are
listed
here
My code:
list1=[]
f = open('3700.txt', "r")
for line in range(17):
list1.append(f.readline())
My result:
['GCC\n', 'GNU\n', 'gcc\n', 'project\n', 'and\n', 'compiler\n', 'Only\n', 'the\n', 'most\n', 'useful\n', 'options\n', 'are\n', 'listed\n', 'here\n']