Bring Your Logic using Python
341 subscribers
109 photos
1 video
4 files
544 links
Logic building using Python : Materials, links, e-books and Code snippets
Download Telegram
In #Python you can group constants using an enum:
A decorator is a function that takes another function and extends its behavior. See an example of repeat_twice decorator 👇

But what about decorators with parameters (repeat_N_times)? Then you need a function returning a function returning a function 🤩
You can use the abstractmethod decorator to force derived classes to implement certain methods:
Use iter to request any number of inputs

for el in iter(input, ""):
print(el)
#Python

You can use str.maketrans and str.translate to apply a mapping of replacements.
🐍📈 Flask by Example

You're going to start building a Flask app that calculates word-frequency pairs based on the text from a given URL. This is a full-stack tutorial covering a number of web development techniques
#python #learnpython
In this #tutorial, you'll learn what APIs are and how to consume them using #Python. You'll also learn some core concepts for working with APIs, such as status codes, HTTP methods, using the requests library, and much more. You'll also see a few examples of real-life #APIs and how to consume them:
In this #tutorial, you'll learn how to use Brython to run #Python code in the browser. Although most front-end web applications are written in JavaScript, you can use #Brython to access #JavaScript libraries and #APIs and deploy Python-based applications to the #web:
Here is how to set a timer and play a song upon completion: