PythonPython How to run another Python script with arguments Another Python script can be run by exec function. However, arguments can't be specified with it. How is it implemented? Okay, use subprocess.call or subprocess.run instead.2023.04.05Python
PythonPython How do nested groups work for regex If there are several formats and data need to be extracted from the string, the nested group might neet to be used in the regex string. How does it actually work? Let's check together with me.2023.03.27Python
PythonPython Convert str to int/float, dict/list to str, and vice versa Conversion is often needed to change the data type. This post covers main cases where you need in your production code. Let's check how to convert a variable.2023.03.24Python
PythonPython Access a class property by the name without dot chaining In some cases, a key string needs to be used to read property. How can it be done in Python? Use setattr, getattr, and hasattr functions2023.03.20Python
PythonPython How to trim unnecessary letters from a string Are unnecessary spaces contained in a string? Then, let's trim them by using strip. It can be used not only for spaces but also for arbitrary characters.2023.03.17Python
PythonPython Use lambda to create a function for simple logic Using lambda is a good choice if a function requires a callback parameter and the logic in the callback is quite simple. Let's learn how to use it if you don't know it.2023.03.03Python
PythonPython 4 ways to remove duplicates from an object list Do you need to remove duplicates from a list? This post covers not only a literal list but also an object list. If it's an object list, it's harder to remove duplicates than the literal version. Let's check how to implement it!2023.03.01Python
PythonSpread operator in Python? How to unpack list/dict How can we write if we want to unpack a list in Python? Is there something like spread operator used in JavaScript? Yes. Use an asterisk to unpack the list. Use double asterisk for dict type. Let's look at the examples.2023.02.27Python
PythonPython How to filter object list Why doesn't Python provide a method to filter a list? It provides filter class instead. You can use it to filter a list/dict. You can also use basic for-loop to do the same thing. Let's learn how to filter a list in this post!2023.02.24Python
PythonPython How to create multiple Threads for async To make multiple tasks asynchronously, it's necessary to know how to create threads in Python. This post shows how to do it.2023.02.22Python