google.com, pub-8786015629279405, DIRECT, f08c47fec0942fa0 Write A Program to Create a User-defined List in Python.

Write A Program to Create a User-defined List in Python.

0



 

 

# Write A Program to Create a User-defined List in Python.

list1=[]

size=int(input("Enter,How Many item added in the List"))

for i in range(size):

    val=input("Enter %d item:"%(i+1))

    list1.append(val)

print(list1)

Output:

Enter,How Many item added in the List6

Enter 1 item:amit

Enter 2 item:23

Enter 3 item:45.45

Enter 4 item:32

Enter 5 item:VIKRAM

Enter 6 item:RAM@DAS

['amit', '23', '45.45', '32', 'VIKRAM', 'RAM@DAS']

 

 


Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Thank you for your interest 😊

We will back shortly after reviewing...

Thank you for your interest 😊

We will back shortly after reviewing...

Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
To Top