By converting the integer to a string, we can concatenate and integer together.
concat_string_int.py
age = 18
msg = 'years'
info = str(age) + ' ' + msg
print(info)
Output
18 years
Previous Next Home
This blog is primarily focus on Java fundamentals and the libraries built on top of Java programming language. Most of the post are example oriented, hope you have fun in reading my blog....:)
No comments:
Post a Comment