I am new in programming and Python. I have a list in my hand and I want to manipulate my list as each words will be consisted of (first) 6 letters maximum.
Sample list as below.
new_list = ['partiye', 'oy', 'vermeyecegimi', 'bilerek', 'sandiga', 'gidecegim']
I used below code for cutting the words.
s = []
a = []
for i in range(len(new_list)):
s = new_list[i]
for j in new_list:
a = s[:6]
print a
Each words consist of max 6 letters. The output of the code is "partiy oy vermey bilere sandig gidece".
But I could not assign my updated (cutted) words into a new list. Can someone advise me how can I do that ?