How to Concatenate Strings in Python, My Newest Lesson for How to Learn Python

In my latest lesson of Python, I can only say one thing, and that is that just the syntax of Python and how it works is starting to get noticeably harder, but I am definitely very excited and am overall up for the challenge! One other thing that I learned about programming this week is that the Syntax is almost nothing, and is actually the easy part of how to really program, in that beyond this is the problem solving portion of programming, and the creation phase of programming after that, where you are able to build your own programs from scratch, contribute to open source projects online, and make your way through tutorials. This is where the real profitability comes in, as my goal in all this is to eventually turn a high level knowledge and application ability of python into something like a $24,000 per year additional income source. I’m hoping that this, coupled with my blog income and my current job in finance, gets me to somewhere around the $80,000 per year mark in the next 18 to 21 months, and to well over the $100,000 per year mark within the next 3 years or so. And so, with all this in mind, let’s look at how to concatenate strings in Python, and why you should always do this. For more information on all things Business, finance and programming, comment down below or subscribe to our blog for additional details and information.

Related Posts

Other cool things that you can do in python include:


Playing with Strings

Adding and Multiplying Numbers

how to concatenate strings in pythonCreating Artificial Intelligence

using it as a DBM language similar to SQL



Error Handling

Create Dates

Use Conditional Logic

learn how to use a computer

Analyze complex conditions

deal with collections

analyze tax ramifications etc.

Assist in anti-fraud regulation type jobs

And a host of other really cool things, read on or subscribe to our blog for additional details and information.

How to Concatenate Strings In Python, The Gist of What This Means

So basically, the way that we can concatenate strings in Python, is by using the + operator within the coding language. To give an example of this, consider the following piece of code:

# first_num = input(‘Enter first number ‘)
# second_num = input(‘Enter second number ‘)       >>>>>>>>>INTEGERS AND FLOATERS HOW TO USE THE CODE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
# # print(int(first_num) + int(second_num))
# print(float(first_num) + float(second_num))
What the above code shows is essentially a fairly simple way that you can say, combine two strings together inside of python, like say the numbers 5 and 6, in order to create the number 56. What the lines of code below that show is that you can title a string as an int, which is an integer, telling Python that the string is now a number, or use float, which is a float, to tell Python that the string is now a number, to be used as a decimal number. For example 
print(int(first_num) + int(second_num)) will return the result of 5, assuming that is the value that you assigned to first_num. This is because you titled the string as an integer by using the int function.
Another example is if you use the function
print(float(first_num) + int(second_num)) which will return the result of 5.0, since you are telling Python to use a number with a decimal. Python can definitely get really complex, and while this is some really simple code down below, take a look at how fancy and crazy this looks!
#^^So what we’re doing here is concatonating what is a variable that is defined as a number (ie. days_in_feb has a value of 28)
# From there we are simply using the print(str(days_in_feb) + ‘days in February), ie. using the str function, in order to tell Python that we are concatonating a number and a string, so it doesn’t get confused and crash!!!
#NOTE, don’t forget that as soon as you put somethin in ” in Python, it automatically becomes a string 🙂
# first_num = ‘5’
# second_num = ‘6’     >>>>>THIS SECTION ALSO TIES WITH THE “INTEGERS AND FLOATERS HOW TO USE THE CODE” SECTION BELOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# print(first_num + second_num)
#input function will ALWAYS return a string, ex. input(‘Enter first number’) and input(‘Enter second nmber’) would return 56
#int function turns a string into an integer and float function turns a string into a decimal number. ie. int = 11 float = 11.0
# first_num = input(‘Enter first number ‘)
# second_num = input(‘Enter second number ‘)       >>>>>>>>>INTEGERS AND FLOATERS HOW TO USE THE CODE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
# # print(int(first_num) + int(second_num))
# print(float(first_num) + float(second_num))
# pi = 3.14159
# print(pi)
# first_num = 5
# second_num = 6    >>>>>>>>>>>>>>>>>>going to infinity
# print(first_num ** second_num)
That my friends and loyal readers, is just a handful of coding lessons in the making, leave a comment down below and let me know what you think!
**An update to this, unfortunately the finance game has gotten extremely stressful and busy these past couple of months since I had started learning programming and unfortunately my software engineering training has pretty much dropped off completely. I still dabble in the small bits of HTML and CSS that are required to run this blog and perform SEO on it properly, but to be honest I am obsessed with SEO and Finance and I know what those feel like, but I can tell that I am definitely not a programmer at heart, not that I don’t really enjoy some aspects of it.
And so, to be honest, I’m looking at these print statements from awhile back and I don’t even really get what they mean, it would take me a week to just get the basics of the basics down like I had before, and I’ve decided to pursue more profitable avenues for me such as Tax, Wealth Management and SEO. I think that these are the skills that I can possibly achieve mastery in and am more interested in those anyways. Goodbye programming, maybe another time I will take you up again, but for now finance and SEO are my true kings. If any beginners have had this problem of giving up with programming after trying it for a few weeks, and have even done this with a mild programming background in SQL, SEO, HTML, CSS, and a little bit of Python, let me know. I really just can’t get into it, and I think that a lot of it is just that the interest isn’t there, oh well.


Final Thoughts on How to Concatenate Strings in Python, My Thoughts on the Subject

Overall, I am really having a ton of fun with Python so far, and I definitely think that I can add long term value to my own bottom line by learning and getting really good at this language. I think I am going to stick to just this language and get really really good at applying and understanding how to use it, because then from there I can move on to doing the same thing with other synergistic languages, like PHP and SQL (for web development and database management.) Like what you see? Read on or subscribe to our blog for additional details and information.








Disclaimer: The opinions and documentation contained within this article and on this blog are the sole property of and are not to be copyrighted or reproduced in any manner, else legal action within the rights of the United States legal code could be use to obtain recompense. All articles and blog posts are the sole opinions of the writers of the blog, and are not necessarily in line with what exactly will work for you, you should consult a CPA, Tax Professional, or Financial Professional to determine what exact financial needs are in line with your interests. Also, from time to time, certain links on this website will be used to generate affiliate commissions, in order to support the health and growth of our website, health and business.