From 1a5dd7b40bc61769b7ec5b1d523d40877a43120b Mon Sep 17 00:00:00 2001 From: Sai Kiran Gudla <118167755+SaikiranGudla@users.noreply.github.com> Date: Fri, 14 Jul 2023 12:35:56 +0530 Subject: [PATCH] Create Sai_Kiran_Gudla_solution1.txt A basic script to understand iter tools in Python. --- .../Sai_Kiran_Gudla_solution1.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 14 July (Live Session Submission)/Code Snippet Exercise-I/Sai_Kiran_Gudla_solution1.txt diff --git a/14 July (Live Session Submission)/Code Snippet Exercise-I/Sai_Kiran_Gudla_solution1.txt b/14 July (Live Session Submission)/Code Snippet Exercise-I/Sai_Kiran_Gudla_solution1.txt new file mode 100644 index 0000000..059a65c --- /dev/null +++ b/14 July (Live Session Submission)/Code Snippet Exercise-I/Sai_Kiran_Gudla_solution1.txt @@ -0,0 +1,10 @@ +ADI_list = [10, 20, 30, 40] + +ADIiter = iter(ADI_list) + +try: + while True: + val = next(ADIiter) + print(val) +except StopIteration: + print('Stop!')