Please help me with this Concatenate some strings In Python, theoperator can glu
ID: 3742474 • Letter: P
Question
Please help me with this Concatenate some strings In Python, theoperator can glue strings together. The fancy name for this operation is "concatenation" which comes from Latin meaning to chain together. For this exercise, you will create three variable bindings for three strings 1. Bind the variable name 'statement' to the string "My favorite food is: ":Note the trailing space at the end of the string 2. Bind the variable name 'food to the string cake 3. Bind the variable name my_favorite food' to the string that results from concatenating the 'statement and 'food variablesExplanation / Answer
statement = "My favourite food is: "
# Binds a string to a variable
food = "cake"
my_favourite_food = statement + food
# Concatenate the string and bind it to another variable
print(my_favourite_food)
# print it
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.