Introduction In Python, this question can be tricky specially if you come from a C++ background where pass by value and pass by reference is well defined. So what does that mean in Python? This question is repeatedly asked and answered online. My take on that is through the following example… Define 4 data types
Introduction In this post, I am going to provide a summary of using quotes in Python. It can be confusing to beginners but it should be easy to grasp by just looking at the following bullet points… Quotes in Python Strings literals in Python must be enclosed with single or double or triple quotes It
Introduction First, keep in mind that null is not part of the Python programming language syntax, though you can find it in other programming languages (ex. Java, JavaScript). In Python syntax, it is None. So what is None ? Do we really need it ? how is it used ? let us discuss that… None
Introduction I think the reason why this topic can be confusing specially to beginners is that it mixes different concepts together. It should not be hard to understand with proper context. In my opinion, to better understand the difference between Args and Kwargs in Python, the following points must be crystal clear… Positional vs keyword
Introduction For more information about for loops in Python, you can find the full article here. So what is the difference between break, continue and pass in Python ? let us borrow some relevant sections from the previous article… Break statement Python like other languages provides a special purpose statement called break. This statement terminates
Introduction In this tiny Python code snippet article, I am going to borrow from the full article about the topic that you can find here. So, what is the difference between bytes and bytearray in Python ? There is no real difference between byte strings and byte arrays except the fact that byte strings are
Introduction So you are curious to know the key difference between a list and tuple in Python ? You can find the answer in many places on the web, however in this code snippet we will summarize it so that it is easy to remember. Take a look at the following table… List vs Tuple
Introduction On the surface, this question looks innocent but if we dig a bit deeper, things start to get confusing. In this short post, we will provide a summary of differences, however to better understand the topic, I recommend that you check the full article here. Depending on which version of Python we are using
Introduction Software quality assurance is extremely important in software development. The purpose of testing is to uncover serious defects before pushing products to production. Testing should be part of team culture and every member should participate.Test engineers can do black box, integration and system level testing. on the other hand, developers write unit tests. Testing
Table of contents Introduction What is a regular expression? What is Python raw string? Python RE module Python regular expressions syntax summary Regular expressions flags re.match re.search Why use re.match? Regular expression compilation re.match and re.search examples re.fullmatch Match objects re.findall re.finditer re.split re.sub Summary References Introduction Welcome to a new Python code snippets post.