Create your own array of strings. Call the array anything you like as long as it is a valid variable name. The list should contain 3 elements The first element should contain ‘AAA’ The second element should contain ‘BBB’ The third element should contain ‘CCC'.

Answer :

ammary456

Answer:

alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

newList = []

N = 3

for i in range(N):

   newList.append(alphabets[i] * 3)

print(newList)

Explanation:

  • Initialize the alphabets.
  • Use a for loop to append three alphabets to new list.
  • Finally print the new list.

Other Questions