Open in app

Sign In

Write

Sign In

Mastodon
Yang Zhou
Yang Zhou

5.4K Followers

Home

About

Published in

TechToFreedom

·Pinned

9 Python Built-In Decorators That Optimize Your Code Significantly

Do more by less: leverage the power of decorators — “Simple is better than complex.” The best Python feature that applies this philosophy from the “zen of Python” is the decorator. Decorators can help you write less and simpler code to implement complex logic and reuse it everywhere. More importantly, there are many awesome built-in Python decorators that make our…

Programming

7 min read

9 Python Built-In Decorators That Optimize Your Code Significantly
9 Python Built-In Decorators That Optimize Your Code Significantly
Programming

7 min read


Published in

TechToFreedom

·May 10

10 Python Itertools To Make Your Code Neater, Cleaner, and Better

Implement the same thing with shorter code — The beauty of Python lies in its simplicity. Not only because Python’s syntax is elegant, but also due to it has many well-designed built-in modules that help us implement common functionalities efficiently. The itertools module, which is a good example, provides many powerful tools for us to manipulate Python iterables…

Programming

5 min read

10 Python Itertools To Make Your Code Neater, Cleaner, and Better
10 Python Itertools To Make Your Code Neater, Cleaner, and Better
Programming

5 min read


Published in

TechToFreedom

·Apr 13

9 Practical Examples of Using Regular Expressions in Python

Handling text like a guru — Whenever you meet problems with text manipulations, regular expressions (regex) are always your best friends. However, it’s hard and impossible to remember all the complex rules of them. Even merely reading the syntax is overwhelming. Therefore, the best way to learn regex is by learning practical examples of them. This…

Python

5 min read

9 Practical Examples of Using Regular Expressions in Python
9 Practical Examples of Using Regular Expressions in Python
Python

5 min read


Published in

TechToFreedom

·Mar 30

19 Sweet Python Syntax Sugar for Improving Your Coding Experience

Do more by less code — Making a function work is one thing. Implementing it with precise and elegant code is another. As the Zen of Python mentioned, “beautiful is better than ugly.” A good programming language like Python will always provide appropriate syntax sugar to help developers write elegant code easily. This article highlights 19…

Programming

11 min read

19 Sweet Python Syntax Sugar for Improving Your Coding Experience
19 Sweet Python Syntax Sugar for Improving Your Coding Experience
Programming

11 min read


Published in

TechToFreedom

·Mar 15

5 XOR Tricks To Improve Your Code Beautifully

Leveraging the powerful bitwise operator — How to swap two variables in place? No matter which programming language you are using, the answer is always the XOR trick: a = 5 b = 7 a = a ^ b b = a ^ b a = a ^ b print(a,b) # 7 5 If you are…

Programming

5 min read

5 XOR Tricks To Improve Your Code Beautifully
5 XOR Tricks To Improve Your Code Beautifully
Programming

5 min read


Published in

TechToFreedom

·Mar 13

3 Built-In Infinite Iterators in Python

And how to use them properly — Iterable and Iterator are essential Python concepts, and many built-in data structures, such as list ,tuple , dict , set and str are Iterables. However, the concepts are not intuitive enough for beginners. Basically, the difference between Iterable and Iterator is: Iterable can print all its elements at once. …

Programming

3 min read

3 Built-In Infinite Iterators in Python
3 Built-In Infinite Iterators in Python
Programming

3 min read


Published in

TechToFreedom

·Mar 6

11 Stunning ChatGPT Powered Tools That Can Make Your Life Easier

Leverage AI for a better living — To say ChatGPT is a challenger to Google is still an understatement. ChatGPT has been the most significant breakthrough in the tech industry for all these years. When it was born, some people thought ChatGPT was just a better chatbot. But since there are many software developers all around the…

Artificial Intelligence

5 min read

11 Stunning ChatGPT Powered Tools That Can Make Your Life Easier
11 Stunning ChatGPT Powered Tools That Can Make Your Life Easier
Artificial Intelligence

5 min read


Published in

Level Up Coding

·Feb 16

9 Python String Manipulation Tricks That Make Your Coding Easier

Handling strings in a Pythonic way — Strings are primitive and essential data structures that every Python developer will handle. As said in the zen of Python, “simple is better than complex”, we can always improve our code with a more Pythonic string manipulation trick. Talk is cheap. Here are 9 must-know Python string operation tricks with…

Programming

5 min read

9 Python String Manipulation Tricks That Make Your Coding Easier
9 Python String Manipulation Tricks That Make Your Coding Easier
Programming

5 min read


Published in

TechToFreedom

·Feb 2

7 Levels of Building Command-Line Interfaces in Python

Execute your Python scripts as bash commands — Writing Python scripts to build command-line interfaces(CLI) is a widely-used technique for DevOps and backend development. The key to implementing CLI in Python is the built-in argparse module. It provides all necessary functionalities and makes it possible to use a Python script as a bash command. This article will introduce…

Programming

6 min read

7 Levels of Building Command-Line Interfaces in Python
7 Levels of Building Command-Line Interfaces in Python
Programming

6 min read


Published in

TechToFreedom

·Jan 24

7 Advanced Python List Operations That Can Effectively Optimise Your Code

Beyond basic CRUD — Python is easy to learn but hard to master. For example, the CRUD (create, read, update, and delete) operations of Python lists are easy and fundamental, but merely knowing them is not enough to handle some complicated scenarios. This article will show you seven advanced list operations to make your…

Programming

5 min read

7 Advanced Python List Operations That Can Effectively Optimise Your Code
7 Advanced Python List Operations That Can Effectively Optimise Your Code
Programming

5 min read

Yang Zhou

Yang Zhou

5.4K Followers

Full-Stack Engineer 🥷| Top Writer🏆

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams