Python Python 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 functions 2023.03.20 Python
Python Python 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.17 Python
Python Python 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.03 Python
Python Python 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.01 Python
Python Spread 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.27 Python
Python Python 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.24 Python
Python Python 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.22 Python
Python Python Using Literal type to restrict the parameter How can we restrict parameter values in Python? Use Literal. Enum can also be used for the same purpose but it can break the existing code. Let's learn how to use Literal together. 2023.02.17 Python
Python Python How to create a missing key automatically How can we create a dictionary in python? Once it's created, we need to add/delete/update/get value. This post covers all your needs. 2023.02.08 Python
Python Python How to define a custom exception with parameters How can a custom exception be defined in Python? If you check the error message to handle differently depending on the error, a different type of exception should be used. This post shows you some examples. 2023.02.01 Python