#!/usr/bin/env python ''' ------------------------------------------ AUTHOR: Robert DiCicco DATE ; 2023-09-18 Challenge 235 Task 02 Duplicate Zaroes ( Python ) ------------------------------------------ ''' myints = [[1, 0, 2, 3, 0, 4, 5, 0],[1, 2, 3],[0, 3, 0, 4, 5]] for mints in myints: print("Input: @ints = ",mints) seen = [] ln = len(mints) for x in mints: if x == 0: seen += [0,0] else: seen.append(x) print(f"Output: {seen[0:ln]}\n") ''' ------------------------------------------ SAMPLE OUTPUT python .\DuplicateZeros.py Input: @ints = [1, 0, 2, 3, 0, 4, 5, 0] Output: [1, 0, 0, 2, 3, 0, 0, 4] Input: @ints = [1, 2, 3] Output: [1, 2, 3] Input: @ints = [0, 3, 0, 4, 5] Output: [0, 0, 3, 0, 0] ------------------------------------------ '''