2. Write a python program to display the sentence B after defining the variable A as shown in the following.
The output is:
variable A = ("brother", "Canada")
sentence B = I have a brother and he stays at Canada with his wife.
Answer:
variable_a = ("brother", "Canada") print("I have a %s and he stays at %s with his wife." %variable_a)
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)