diff --git a/saving_input_into_list.py b/saving_input_into_list.py new file mode 100644 index 00000000000..03caac68016 --- /dev/null +++ b/saving_input_into_list.py @@ -0,0 +1,13 @@ +ran= int(input("Enter the range of elements you want to store / insert ")) +l1=[] +for i in range(ran): + l1.append(input("Enter here ")) + +print(l1) + + +""" +program first asks the user how many values they want to enter. Then, using a loop, it lets the user enter that many values one by one. +Each entered value is saved into a list called l1. Once all the values are entered, the program prints the complete list, showing +everything the user typed. It's a beginner-friendly way to learn how to collect multiple inputs and store them for later use. +""" \ No newline at end of file