45: Take two strings and concatenate them. [1000+ Python Programs]

Question: Question: Write a Python Program that takes two strings and concatenates them.


# Step 1: Take 1st user input
string1 = input("Enter first string: ")

# Step 2: Take 2nd user input
string2 = input("Enter second string: ")

# Step 3: Concatinate Strings using + operator
concatenated_string = string1 + string2

# Step 4: Print Result
print(f"The concatenated string is: {concatenated_string}")

Enter first string: Code
Enter second string: 2care
The concatenated string is: Code2care

Notebook Example:

Notebook Output - Concatinate two Pyton Strings

These Python programs are created by experienced programmers to aid students in learning Python. We are here to make your learning experience as interactive and informative as possible. If you have questions or need more clarification, feel free to ask. Happy coding!

Please support independent contributors like Code2care by donating a coffee.

Buy me a coffee!

Buy Code2care a Coffee!

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap