Author image

Guest Contributor

64 Posts Twitter

Using Global Variables/Constants in Java

Introduction

Java's object-oriented code structure can make referencing variables in multiple places more difficult. It can also be difficult at times to decide which class a given variable should be a part of, especially if it's a widely used value like a database connector or mathematical constant.

In many languages,

Continue Reading

How to Check if List is Empty in Python

Introduction

Lists are one of the four most commonly used data structures provided by Python. Its functionality, extensibility, and ease of use make it useful for implementing various types of functionalities.

Python lists have a few interesting characteristics:

  1. Mutability - meaning it can change, which means it allows us to
Continue Reading

How to Concatenate Two Lists in Python

Introduction

List concatenation the act of creating a single list from multiple smaller lists by daisy chaining them together.

There are many ways of concatenating lists in Python. Specifically, in this article, we'll be going over how to concatenate two lists in Python using the plus operator, unpack operator, multiply

Continue Reading

How to Split a String in Java

Introduction

Oftentimes, we are faced with a situation where we need to split a string at some specific character or substring, to derive some useful information from it.

For example, we might want to split a phone number on the country code or data imported from a CSV file.

In

Continue Reading

Hoisting in JavaScript

Introduction

Hoisting is a JavaScript behavior commonly known for making variables and functions available for use before the variable is assigned a value or the function is defined. In effect, it puts variable, function and class declarations to the top of their scope (the global scope or a function) before

Continue Reading