Skip to content

Commit da38209

Browse files
committed
saving_input_into_list.py
1 parent d2e2fc5 commit da38209

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)