Python | Split String Get Element

Summary: Use one of the following ways to split a string to get an element from a string: Minimal Example Problem Formulation 📜Problem: Given a string. How will split the string and get the element you want from the split string? Example 1 Extract the word “world” from the given string. Example 2 This is … Read more

Python | Split String Hyphen

⭐Summary: Use “given string”.split(‘-‘) to split the given string by hyphen and store each word as an individual item in a list. Some other ways to split using hyphen include using a list comprehension and the regex library. Minimal Example Problem Formulation 📜Problem: Given a string, how will you split the string into a list … Read more

Python | Split String by Underscore

⭐Summary: Use “given string”.split(‘_’) to split the given string by underscore and store each word as an individual item in a list. Minimal Example Problem Formulation 📜Problem: Given a string, how will you split the string into a list of words using the underscore as a delimiter? Example Let’s understand the problem with the help … Read more

Python | Split String Between Characters

⭐Summary: The easiest way to split the string between the characters is to slice the string and extract the required split substring. Another effective way to split between characters is to use the re.search method from the regex module. Minimal Example Problem Formulation 📜Problem: Given a string; How will you split the string between characters? … Read more

Setup a Virtual Environment with Visual Studio Code in Python

Problem Formulation and Solution Overview This article will show you how to create a Virtual Environment inside the Visual Studio Code, the VSC Editor. Virtual Environments are best used when a coder or several coders work together to develop medium to large-scale applications. The best approach is to keep this code and associated libraries and … Read more

Python Convert Hex to Base64

💬 Question: How to convert a hexadecimal string such as 02af01ff00 to a normal string using the Base64 format in Python? 👉 Short answer: Use the following fancy one-liner expression to convert the hex string s to a Base64-encoded Python string: base64.b64encode(bytes.fromhex(s)).decode(). For the long answer, keep reading! 🥸 If you’re like me, you may … Read more

Solidity Function Calls – Positional vs Named Arguments

In this article, we’ll entertain ourselves by learning about an interesting topic: positional and named function calls in Solidity. It’s part of our long-standing tradition to make this (and other) articles a faithful companion and supplement to the official Solidity documentation. Function Parameters and Arguments So far, we’ve learned about internal and external function calls, … Read more

Python | Split String After Delimiter

Summary: You can use one of the following methods to split a string after the delimiter – Minimal Example Problem Formulation  📜Problem: Given a string; How will you split the string after the delimiter? The output must only contain the substring after the delimiter. Example Let’s visualize the problem with the help of an example: … Read more

3 Easy Habits That Can Make You Rich as a Freelance Coder

In this article, I’ll show you three simple habits to get way more done, have a much easier and stress-free life, and make more money. Almost guaranteed. Based on science! But there’s a catch: these habits are often tough to implement for employees. I know because I have been there and done that. When I finally created … Read more