How to print each element of a list until a certain length Python

How to print each element of my list to a defined length (5), so for example: myList = ["abcdefgh", "ijklmnop"] The output I’m looking for is: abcde ijklm I’ve tried this (printing dates from an excel sheet): i = 2 x =0 while i < maxR: valuesItems = wb0["C" + str(rowList[i])].value itemDate.append(valuesItems) print(len(itemDate[x])) i =… Read More How to print each element of a list until a certain length Python