Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

adding two strings together in python

# concatenating strings just means combining strings together
# it is used to add one string to the end of another
# below are two exmaples of how concatenation can be used 
# to output 'Hello World':

# example 1:
hello_world = "Hello" + " World"
print(hello_world)

>>> Hello World

# example 2:
hello = "Hello"
print(hello + " World")

>>> Hello World
Source by www.pythonforbeginners.com #
 
PREVIOUS NEXT
Tagged: #adding #strings #python
ADD COMMENT
Topic
Name
5+7 =