3. 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", "20")
sentence B = I have a brother and he is 20 years old.
Answer:
variable_a = ("brother", 20) print("I have a %s and he is %i years old." %variable_a)
More Exercises:
Python String ExercisesMore Numpy Exercises:
Numpy String ExercisesMore Pandas Exercises:
Pandas Series ExercisesMore Tutorials:
Python Installation - Linux (Ubuntu)