Use string formatting you have learned in the lecture to write the answer
Having doubt in applying string format, can you guide with an example?
# given list
new_list = ['Ram', 45, 'Singh', 'Years', ['1 apartment', '2 cars', '3 bank accounts']]
#write the print statement
print("The age of ",new_list[0],new_list[2],"is",new_list[3],"\n""He has",new_list[4][0],",",new_list[4][1],"ans",new_list[4][2])
1 Like
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.