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
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
Environmental Sciences,
1 month ago
Math,
1 month ago
Math,
2 months ago
India Languages,
2 months ago
Chemistry,
9 months ago
Math,
9 months ago