Must have and essential for text processing in Python

Check Digit

  • number:^[0-9]*$
  • n-digit number:^\d{n}$
  • At least n-digit number:^\d{n,}$
  • mn digits:^\d{m,n}$
  • Numbers starting with zero and non-zero:^(0|[1-9][0-9]*)$
  • Numbers starting with non-zero and up to two decimal places:^([1-9][0-9]*)+(.[0-9]{1,2})?$
  • Positive or negative numbers with 1–2 decimal places:^(\-)?\d+(\.\d{1,2})?$
  • Positive numbers, negative numbers, and decimals:^(\-|\+)?\d+(\.\d+)?$
  • Non-zero positive integer:^[1-9]\d*$ or ^([1-9][0-9]*){1,3}$ or ^\+?[1-9][0-9]*$
  • Non-zero negative integer:^\-[1-9][]0-9"*$ or…

A tool that makes develop interactive web app super easy.

Today I’d like to share a Python tool that makes the development of interactive web apps super easy. It’s okay if you don’t know HTML, CSS, or JavaScript.

The interactive web app is very practical, such as making a questionnaire page, a voting system, an information collection form, uploading files…

A tutorial to understand the concepts of yield, iterator, and generator.

Today let’s talk about Python yield, iterators and generators that can be seen in many tutorials but always causes some confusion.

Just like decorators, these three concepts are tied together. For example, if you want to know what is yield, you must understand what a generator is first.

But before…

Tony Li Xu

Senior Cloud and DevOps Engineer from both HighTech and FinTech world.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store