Python allows you to create enumerations that are also regular strings!
Previously, when working with APIs, JSON, and configurations, it was often necessary to manually extract the value from an Enum.
For example:
When serializing, you would get an enumeration object:
rather than a regular string:
In Python 3.11,
Now, the value can be used wherever a string is expected:
The result:
At the same time, the advantages of enumerations are preserved:
You cannot accidentally pass an incorrect value:
will result in an error.
π₯
#Python #Coding #StrEnum #DevTips #Programming #Python311
β¨ Join Best TG Channels https://xn--r1a.website/addlist/0f6vfFbEMdAwODBk
βοΈ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
Previously, when working with APIs, JSON, and configurations, it was often necessary to manually extract the value from an Enum.
For example:
class Status(Enum):
ACTIVE = "active"
When serializing, you would get an enumeration object:
Status.ACTIVErather than a regular string:
"active"In Python 3.11,
StrEnum was introduced to solve this problem.from enum import StrEnum
class Status(StrEnum):
ACTIVE = "active"
BLOCKED = "blocked"
Now, the value can be used wherever a string is expected:
json.dumps({"status": Status.ACTIVE})The result:
{"status": "active"}At the same time, the advantages of enumerations are preserved:
Status.ACTIVEStatus.BLOCKEDYou cannot accidentally pass an incorrect value:
Status("unknown")will result in an error.
π₯
StrEnum allows you to combine the strict typing of enumerations with the convenience of regular strings, without manual conversion when working with APIs, JSON, and configurations.#Python #Coding #StrEnum #DevTips #Programming #Python311
β¨ Join Best TG Channels https://xn--r1a.website/addlist/0f6vfFbEMdAwODBk
βοΈ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
β€4
Your AI assistant is guessing because it doesn't know your documents.
Build a private AI workflow over your own PDFs and documentation:
β’ choose a model that fits your RAM or VRAM
β’ index your files locally
β’ require answers with source citations
β’ test the workflow in Python before adding agents
How AI Helps publishes practical local-AI setups, failure cases and a free model picker β tested workflows, not recycled AI news.
π Join How AI Helps
Build a private AI workflow over your own PDFs and documentation:
β’ choose a model that fits your RAM or VRAM
β’ index your files locally
β’ require answers with source citations
β’ test the workflow in Python before adding agents
How AI Helps publishes practical local-AI setups, failure cases and a free model picker β tested workflows, not recycled AI news.
π Join How AI Helps
β€1
Forwarded from Machine Learning with Python
This channels is for Programmers, Coders, Software Engineers.
0οΈβ£ Python
1οΈβ£ Data Science
2οΈβ£ Machine Learning
3οΈβ£ Data Visualization
4οΈβ£ Artificial Intelligence
5οΈβ£ Data Analysis
6οΈβ£ Statistics
7οΈβ£ Deep Learning
8οΈβ£ programming Languages
β
https://xn--r1a.website/addlist/8_rRW2scgfRhOTc0
β
https://xn--r1a.website/Codeprogrammer
Please open Telegram to view this post
VIEW IN TELEGRAM
β€1
How to check if a string is printable in Python π€―
>>> "123".isprintable()
True
>>> "abc".isprintable()
True
>>> "\t
".isprintable()
False
#Python #Programming #Coding #Tutorial #Tech #Dev
β¨ Join Best TG Channels https://xn--r1a.website/addlist/0f6vfFbEMdAwODBk
βοΈ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
>>> "123".isprintable()
True
>>> "abc".isprintable()
True
>>> "\t
".isprintable()
False
# Python string method .isprintable()
>>> "123".isprintable()
True
>>> "abc".isprintable()
True
>>> "\t
".isprintable()
False
#Python #Programming #Coding #Tutorial #Tech #Dev
β¨ Join Best TG Channels https://xn--r1a.website/addlist/0f6vfFbEMdAwODBk
βοΈ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
β€5
collections.ChainMap β a built-in Python class that combines multiple dictionaries or other mappings into a single, updatable view. π§
Instead of merging dictionaries and creating new data structures in memory, it links them by reference, allowing you to search and manage them as a single entity. π
#Python #Coding #DataStructures #Programming #Tech #DevTools
β¨ Join Best TG Channels https://xn--r1a.website/addlist/0f6vfFbEMdAwODBk
βοΈ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
Instead of merging dictionaries and creating new data structures in memory, it links them by reference, allowing you to search and manage them as a single entity. π
# Example usage of collections.ChainMap
from collections import ChainMap
dict1 = {'a': 1, 'b': 2}
dict2 = {'b': 3, 'c': 4}
combined = ChainMap(dict1, dict2)
print(combined['b']) # Output: 2
#Python #Coding #DataStructures #Programming #Tech #DevTools
β¨ Join Best TG Channels https://xn--r1a.website/addlist/0f6vfFbEMdAwODBk
βοΈ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
β€3
Function
is designed for pretty-printed, formatted output in Python. π
It automatically formats complex data structures, such as nested lists, dictionaries, and tuples, by adding indentation and line breaks for improved readability. β¨
Features:
β’ Supports customization of the output width for convenient formatting.
β’ Includes depth and compact parameters to control the level of nesting and display compactness.
β’ Available through the standard pprint module in the Python library. π»
#Python #Programming #Code #Developer #Tech #Scripting
β¨ Join Best TG Channels https://xn--r1a.website/addlist/0f6vfFbEMdAwODBk
βοΈ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
pprint()
pprint()
is designed for pretty-printed, formatted output in Python. π
It automatically formats complex data structures, such as nested lists, dictionaries, and tuples, by adding indentation and line breaks for improved readability. β¨
Features:
β’ Supports customization of the output width for convenient formatting.
β’ Includes depth and compact parameters to control the level of nesting and display compactness.
β’ Available through the standard pprint module in the Python library. π»
#Python #Programming #Code #Developer #Tech #Scripting
β¨ Join Best TG Channels https://xn--r1a.website/addlist/0f6vfFbEMdAwODBk
βοΈ Join Our WhatsApp Channel https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A
β€6π1
Forwarded from Machine Learning with Python
π¨ SURPRISE ALERT! π¨
Stop paying full price on Udemy. Seriously. πΈ
I built a bot that hunts down 100% FREE Udemy coupons 24/7 β while you sleep, eat, or scroll. π―
Here's the magic:
π Mini App catalog β every active free coupon in one place
π Auto-push β new courses land straight in your chat
π’ Live channel β never miss a deal
Why it matters?
Most people pay $200+ for courses you can grab for $0 β if you know where to look. Now you have a bot that does the looking for you. β‘
π Try it now: https://xn--r1a.website/UdemySybot?start=ref_channel
Your future self (and your wallet) will thank you. π
Stop paying full price on Udemy. Seriously. πΈ
I built a bot that hunts down 100% FREE Udemy coupons 24/7 β while you sleep, eat, or scroll. π―
Here's the magic:
π Mini App catalog β every active free coupon in one place
π Auto-push β new courses land straight in your chat
π’ Live channel β never miss a deal
Why it matters?
Most people pay $200+ for courses you can grab for $0 β if you know where to look. Now you have a bot that does the looking for you. β‘
π Try it now: https://xn--r1a.website/UdemySybot?start=ref_channel
Your future self (and your wallet) will thank you. π
Telegram
Free Courses Bot
The first bot in the world of Telegram that offers free courses, free certificates.
β€2
Forwarded from Machine Learning with Python
π¨ SURPRISE ALERT! π¨
Stop paying full price on Udemy. Seriously. πΈ
I built a bot that hunts down 100% FREE Udemy coupons 24/7 β while you sleep, eat, or scroll. π―
Here's the magic:
π Mini App catalog β every active free coupon in one place
π Auto-push β new courses land straight in your chat
π’ Live channel β never miss a deal
Why it matters?
Most people pay $200+ for courses you can grab for $0 β if you know where to look. Now you have a bot that does the looking for you. β‘
π Try it now: https://xn--r1a.website/UdemySybot?start=ref_channel
Your future self (and your wallet) will thank you. π
Stop paying full price on Udemy. Seriously. πΈ
I built a bot that hunts down 100% FREE Udemy coupons 24/7 β while you sleep, eat, or scroll. π―
Here's the magic:
π Mini App catalog β every active free coupon in one place
π Auto-push β new courses land straight in your chat
π’ Live channel β never miss a deal
Why it matters?
Most people pay $200+ for courses you can grab for $0 β if you know where to look. Now you have a bot that does the looking for you. β‘
π Try it now: https://xn--r1a.website/UdemySybot?start=ref_channel
Your future self (and your wallet) will thank you. π
Telegram
Free Courses Bot
The first bot in the world of Telegram that offers free courses, free certificates.
httptap
This is a command-line tool that breaks down an HTTP request into individual stages: DNS resolution, TCP connection, TLS handshake, and data transfer.
It generates a detailed waterfall timeline, which allows you to quickly identify which stage of the request is causing the delay.
π Language: #Python 99%
βοΈ Stars: 526
More: https://github.com/ozeranskii/httptap
This is a command-line tool that breaks down an HTTP request into individual stages: DNS resolution, TCP connection, TLS handshake, and data transfer.
It generates a detailed waterfall timeline, which allows you to quickly identify which stage of the request is causing the delay.
π Language: #Python 99%
βοΈ Stars: 526
More: https://github.com/ozeranskii/httptap
β€2
π₯ Land Your Dream Job β Free Interview Prep Resources Inside!
πStruggling with tough interview questions? Nervous about technical grilling? You're not alone.
We've just released a bunch of 100% free interview prep kits for 2026 β covering common Q&As, behavioral questions, technical deep-dives, and role-specific tips for #Cisco, #AWS, #PMP, #AI, #Python, #Excel, and #Cybersecurity.
π₯No signup traps, no hidden fees β just click and download.
π― Interview Question Bank β https://bit.ly/4xzKG0o
π Free Cert EβBook β https://bit.ly/4zffDZp
πͺ Free Online Course β https://bit.ly/3TPLkbl
βοΈ Free AI Materials β https://bit.ly/4q7T7gR
π Cloud Study Guide β https://bit.ly/4wbsjgV
Tag a friend who's also job-hunting β Ace together! πͺ
π Join the community: https://chat.whatsapp.com/FQOG04r9xSiIa2ElhaNUJU
πJoin SPOTO telegram Group: https://xn--r1a.website/spotoITstudygroup
π² Need personalized help? β https://wa.link/1zrbdh
πStruggling with tough interview questions? Nervous about technical grilling? You're not alone.
We've just released a bunch of 100% free interview prep kits for 2026 β covering common Q&As, behavioral questions, technical deep-dives, and role-specific tips for #Cisco, #AWS, #PMP, #AI, #Python, #Excel, and #Cybersecurity.
π₯No signup traps, no hidden fees β just click and download.
π― Interview Question Bank β https://bit.ly/4xzKG0o
π Free Cert EβBook β https://bit.ly/4zffDZp
πͺ Free Online Course β https://bit.ly/3TPLkbl
βοΈ Free AI Materials β https://bit.ly/4q7T7gR
π Cloud Study Guide β https://bit.ly/4wbsjgV
Tag a friend who's also job-hunting β Ace together! πͺ
π Join the community: https://chat.whatsapp.com/FQOG04r9xSiIa2ElhaNUJU
πJoin SPOTO telegram Group: https://xn--r1a.website/spotoITstudygroup
π² Need personalized help? β https://wa.link/1zrbdh
β€1
A good textbook on algorithms with clear explanations and plenty of illustrative examples.
Suitable for both systematic study of algorithms and as a reference guide to which you can refer as needed.
β Link to the book
https://jeffe.cs.illinois.edu/teaching/algorithms/
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
β€1