Skip to content
Iampsp Blog

Iampsp Blog

I am a programming service provider

My Portfolio
Project order
Reviews
Favorite Exchange

Categories

  • C
  • C#
  • C++
  • CSS
  • Firefox Addons
  • Firefox Themes
  • HTML
  • JAVA
  • JavaScript
  • jQuery
  • Mybb Plugins
  • MySQL
  • PHP
  • Python
  • React
  • SQL

Recent Posts

  • jQuery – The noConflict() Method
  • jQuery – AJAX get() and post() Methods
  • jQuery – AJAX load() Method
  • jQuery – AJAX Introduction
  • jQuery Traversing – Filtering

Python – String Concatenation

String Concatenation

To concatenate, or combine, two strings you can use the + operator.

Example

Merge variable a with variable b into variable c:

a = "Hello"
b = "World"
c = a + b
print(c)

Example

To add a space between them, add a " ":

a = "Hello"
b = "World"
c = a + " " + b
print(c)
Posted on 2025-03-23Author MostafaCategories PythonTags python, python create venv, python dictionary, python download, python for loop, python online, python online compiler, python regex, python requests, python string concatenation, python string concatenation best practice, python string concatenation function, python string concatenation multiple lines, python string concatenation operator, python string concatenation performance, python string concatenation time complexity, python string concatenation with int, python string concatenation with separator, python string concatenation with variable, python substring

Post navigation

Previous Previous post: Python – Modify Strings
Next Next post: Python – Format – Strings
Proudly powered by WordPress