Computer Science, asked by Anushkka4564, 9 months ago

Get a list of name and make them title caps and print the list

Answers

Answered by StaceeLichtenstein
0

Following are the following code in the python language

in1 = ['san', 'ran', 'TAT','Bat']  #list

list1 = [i.upper() for i in in1] #iteraring the loop  

print(list1) # display list  

Output:

['SAN', 'RAN', 'TAT', 'BAT']

Explanation:

Following are the description of code is given below  

  • Create a list in the "in1 ".In this we storing the value in the string format .
  • After that we iterated the for loop for convert into the upper case .
  • The upper function is used for convert them string into the upper case .
  • Finally print the value of string by using the print value .

Learn More :

  • brainly.com/question/13741558

Similar questions