From 3d027e74fc93c89a63b00a18296cd2536c50cd66 Mon Sep 17 00:00:00 2001 From: Mayank SIngh <30663174+pk0011@users.noreply.github.com> Date: Fri, 2 Oct 2020 11:38:44 +0530 Subject: [PATCH] Update 07_slices.py This is an additional exercise, to print every alternate element. --- src/07_slices.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/07_slices.py b/src/07_slices.py index 5e0b3bd8ee..a8efcaa70a 100644 --- a/src/07_slices.py +++ b/src/07_slices.py @@ -29,9 +29,12 @@ # Output every element except the last one: [2, 4, 1, 7, 9] print() +# Output every alternate element: [2, 1, 9, 6] +print() + # For string s... s = "Hello, world!" # Output just the 8th-12th characters: "world" -print() \ No newline at end of file +print()