How to combine string and number

CODE




How to combine string and number

Write a python statement that combines the string "Joe warren is 52 years old" from the string " Joe warren" and the number 52 and then prints the result

>>> a="Joe warren is "
>>> b=str(52)
>>> c=" years old."
>>> d=a+b+c
>>> print(d)

Output:
Joe warren is 52 years old.

How to combine string and number How to combine string and number Reviewed by Unknown on December 10, 2018 Rating: 5

No comments:

If you have any doubt or query ,comment below:

Programming copyright © 2018-19. Powered by Blogger.