PYTHON PROGRAMMING Create a list with the name “friends” and store name of any five friends
pls answer correctly
it's important
Answers
Answered by
2
The Code:
The given problem is solved using Python.
# Declare a list of 5 friends.
friends=['James','Joseph','Jacob','Alexander','Oliver']
# Display your friends name.
print(*friends,sep=', ')
The Output:
>> James, Joseph, Jacob, Alexander, Oliver
See attachment for verification.
Learn More:
List: In Python, list is used to store multiple items in a single variable.
Properties of lists:
- Ordered: List has a definite order. It will not be changed.
- Mutable: We can add, delete elements present in a list.
- A list allow duplicate values.
- A list can be nested.
Attachments:
Similar questions
Hindi,
24 days ago
World Languages,
24 days ago
Computer Science,
24 days ago
Physics,
1 month ago
Math,
9 months ago
Math,
9 months ago