Suppose I have a list of data
data= ['Mom','Dad',1,'Dog','World']
I want to format another string with these strings, but I want the formatting to be so that if the element in data is a string then it should be surrounded by quotes. I could use flow control, but would rather just use string formatting instead.
For instance, the desired output would be something like
You are my 'Mom'
You are my 'Dad'
You are my 1 #Notice that the 1 is an int and is not surrounded by quotes
You are my 'Dog'
You are my 'World'
Is there a way to format that?