16,280 questions
21,750 answers
573 users
lst = [34, 78, 90, 'python', 'java', 'c++'] for item in lst[:-1]: print(item) ''' run: 34 78 90 python java '''
lst = [34, 78, 90, 'python', 'java', 'c++'] index = 0 while index < len(lst) - 1: print(lst[index]) index += 1 ''' run: 34 78 90 python java '''