182k views
5 votes
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'.

User Osagie
by
6.8k points

1 Answer

4 votes

Answer:

alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

newList = []

N = 3

for i in range(N):

newList.append(alphabets[i] * 3)

print(newList)

Step-by-step explanation:

  • Initialize the alphabets.
  • Use a for loop to append three alphabets to new list.
  • Finally print the new list.
User Keks
by
7.2k points