Important Notice:

Create and Display a List

Create and Display a List

4 views 1 min read
Program 1: Create and Display a List
Aim / उद्देश्य :-

English:  Write a Python program to create a List and display its elements.
हिंदी:  एक Python program लिखिए जो एक List को create करे और उसके elements को display करे।

Code / कोड :-
 
numbers = [10, 20, 30, 40, 50]

print("List:", numbers)
 
Output :-
List: [10, 20, 30, 40, 50]
 
Explanation / व्याख्या :-

English:
The List numbers is created using square brackets [ ]. It contains five elements. The print() function displays the List.

हिंदी:
numbers नाम की List को square brackets [ ] का उपयोग करके बनाया गया है। इसमें पाँच elements हैं। print() function List को display करता है।

Related Notes