English, asked by anji4671, 2 months ago

Get a list of name as an input from the user and make the first letters in caps and print each word as a list

Answers

Answered by pallavim545
1

Answer:

listA = []

# Input number of elements

n = int(input("Enter how many number of elements you want to add in the list : "))

# Each sublist has two elements

for i in range(0, n):

  print("Enter element No-{}: ".format(i + 1))

  ele = input()

  listA.append(ele)

listb=[x.capitalize() for x in listA]

print("The entered list is: \n",listA)

print("capitalised list",listb)

Explanation:

Similar questions