What can sometimes be one of the more challenging aspects of learning a new programming language can also often be one of the most interesting. In this particular case, I am referring to learning the ins and outs of the new language’s standard data types. When learning C++ one will inevitably come across a data type known as a vector.
You may have heard the phrase, or perhaps seen a meme or two about “rubber duck debugging”. But what exactly is rubber duck debugging? Now this may sound ridiculous when you first read this, but rubber duck debugging is the process of debugging code by explaining it to a rubber duck. Yes, you read that right. That may seem absolutely crazy… talking to a rubber duck, but it absolutely works!
Strings are a data type that contain a sequence of letters, numbers, symbols, and whitespace. However, sometimes we need to access an individual character, or just a few characters, of a string. Thankfully Ruby provides a simple and straightforward way for doing so.
Have you ever been to a website where the scroll bar looked different from normal? Have you ever thought “I wish I could make something like that on my website/project!” Well, it turns out you can! With just 3 easy CSS classes, you can customize the scrollbar in so many different ways.
Ever wanted to make your code be even briefer, and pershaps even easier to read? One of the ways to do that in the Python programming language is to be make use of the single line conditional statement for an if/else block. First, lets take a look at what an if/else block looks like in Python when not written as a single line.