String Concatenation In Python
String concatenation is used to combine two string values. Suppose we need a program that takes the first name and last name of the user and displays the full name. In the python program, it will take the first name then the last name finally combines both values to display the full name of the user.
msg = "Hi"
user = "Winston"
name = msg +" "+ user
print(name)
# User input and concatenate both string values
first_name = input("Please enter first name")
last_name = input("Please enter last name")
name = first_name +" "+ last_name
print(name)
Github:
https://github.com/asadraza825/python/blob/master/string_concatenation.ipynbTags: Python, Python Programming, Python Input function, Taking input in Python