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.

Other cool things that you can do in python include:

Loops

Playing with Strings

Adding and Multiplying Numbers

how to concatenate strings in pythonCreating Artificial Intelligence

using it as a DBM language similar to SQL

Arrays

Debugging

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!

 

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.

 

 

Cheers!

 

*Inflation Hedging.com

Sources:

https://www.bankrate.com/banking/cds/cd-rates/

https://money.cnn.com/data/markets/

 

Disclaimer: The opinions and documentation contained within this article and on this blog are the sole property of inflationhedging.com 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.