Computer Science, asked by ritvik6128, 1 month ago

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 anindyaadhikari13
2

The Co‎de:

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:

  1. Ordered: List has a definite order. It will not be changed.
  2. Mutable: We can add, delete elements present in a list.
  3. A list allow duplicate values.
  4. A list can be nested.
Attachments:
Similar questions