Skip to content

Commit 1c06d1f

Browse files
Merge pull request #2656 from LAbhilashKumar/saving_input_in_List
saving_input_into_list.py
2 parents 7a67509 + da38209 commit 1c06d1f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

saving_input_into_list.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
ran= int(input("Enter the range of elements you want to store / insert "))
2+
l1=[]
3+
for i in range(ran):
4+
l1.append(input("Enter here "))
5+
6+
print(l1)
7+
8+
9+
"""
10+
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.
11+
Each entered value is saved into a list called l1. Once all the values are entered, the program prints the complete list, showing
12+
everything the user typed. It's a beginner-friendly way to learn how to collect multiple inputs and store them for later use.
13+
"""

0 commit comments

Comments
 (0)