Python | Split String by Whitespace

Summary: Use “given string”.split() to split the given string by whitespace 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 whitespace as a separator/delimiter? Let’s understand the problem with the help of a few examples: … Read more

Solidity Function Type Examples – A Simple Illustrated Guide

In this article, we’ll continue our story on function types, but this time, we’ll go through several illustrative examples and learn how they work and breathe in practice. This way, by complementing what we already know about function types, we’ll get a broader perspective and better understanding. It’s part of our long-standing tradition to make … Read more

Solidity Array Members and Manipulation Techniques

In this article, we’ll cover an important topic on array members and array manipulation techniques. This knowledge will prove extremely useful as we progress with our journey through Solidity and gain experience. It’s part of our long-standing tradition to make this (and other) articles a faithful companion, or a supplement to the official Solidity documentation, … Read more

Dangling References to Storage Array Elements – Solidity Reference Types

In this article, while being unable to keep the focus on anything else with all this dangling around, we’ll entertain ourselves with dangling references to storage array elements. It’s part of our long-standing tradition to make this (and other) articles a faithful companion, or a supplement to the official Solidity documentation, starting with this part … Read more

Solidity Reference Types – Array Slices and Structs

♠️ In this article, we’ll deal the cards and play with array slices and structs. Both of them are very powerful players, and it’s good having them at the table. It’s part of our long-standing tradition to make this (and other) articles a faithful companion or a supplement to the official Solidity documentation for this … Read more

Solidity Bytes and String Arrays, Concat, Allocating Memory, and Array Literals

πŸ’‘ With this article, we’ll discover a new and fascinating world of bytes and strings, as well as ways to manipulate them, allocate memory arrays, and use array literals. It’s part of our long-standing tradition to make this (and other) articles a faithful companion, or a supplement to the official Solidity documentation, starting with these … Read more

Introduction to Solidity Reference Types and Arrays

Through this article, we’ll learn about reference types, in particular structs, arrays, and mappings, continued by a story on data locations, memory areas, and assignment behaviors. Finally, we’ll conclude with a section introducing arrays. It’s part of our long-standing tradition to make this (and other) articles a faithful companion, or a supplement to the official … Read more

Python Return Integer From Function

Do you need to create a function that returns an integer value but you don’t know how? No worries, in sixty seconds, you’ll know! Go! πŸ”₯πŸ”₯πŸ”₯ A Python function can return any object. To return an integer, use the built-in int() function. Or create your own function with an arbitrary expression within the function body … Read more