String Uppercase in Python

Use the upper() method to transform a whole string into uppercase. regular_text = "This is a regular text." upper_case_text = regular_text.upper() print(regular_text) #This is a regular text. print(upper_case_text) #THIS IS A REGULAR TEXT. Notice that the original regular_text variable remains…

String Lowercase in Python

Use the lower() method to transform a whole string into lowercase. regular_text = "This is a Regular TEXT." lower_case_text = regular_text.lower() print(regular_text) #This is a Regular TEXT. print(lower_case_text) #this is a regular text. Notice that the original regular_text variable remains…

Multiline Strings in Python

Triple Quotes To handle multiline strings in Python you use triple quotes, either single or double. This first example uses double quotes. long_text = """This is a multiline, a long string with lots of text, I'm wrapping it in triple…

How to remove all white spaces in a string in Python

If you want to truly remove any space in a string, leaving only the characters, the best solution is to use a regular expression. You need to import the re module that provides regular expression operations. Notice the \s represents…

for Loops in Python

Loops are used when you need to repeat a block of code a certain number of times or apply the same logic over each item in a collection. There are two types of loops: for and while. In this article,…

On Developers, Businesses, and Audiences

"Build it and they will come". A common phrase in the start-up world. Well, if you have been in this industry long enough, you know that is not quite the case. I prefer to go with the opposite: find the…