Ранее я делал серию постов про битовые операторы.
Вот вам ещё один наглядный пример как это используется в Python в модуле re.
Чтобы указать флаг для компилятора нам надо указать его после передаваемой строки. Например, добавляем флаг для игнорирования переноса строки.
pattern = re.compile(r"(\w+)+")
words = pattern.search(text, re.DOTALL)
А как указать несколько флагов? Ведь явно будут ситуации когда нам потребуется больше одного. Кто читал посты по битовые операторы уже понял как.
pattern.search(text, re.DOTALL | re.VERBOSE)
А теперь смотрим исходники, что находится в этих атрибутах?
Не удивительно, степени двойки. Почему? Потому что каждое следующее значение это сдвиг единицы влево.
>>> for n in [1, 2, 4, 8, 16, 32, 64, 128, 256]:
>>>
print(bin(n))
0b1
0b10
0b100
0b1000
0b10000
0b100000
0b1000000
0b10000000
0b100000000
Чтобы было понятней, давайте напишем тоже самое но иначе, добавим ведущие нули:
000000001
000000010
000000100
000001000
000010000
000100000
001000000
010000000
100000000
Не понятно что тут происходит? Читай три поста про битовые операторы начиная с этого ➡️https://t.me/pythonotes/45
В общем, это пример применения побитовых операций в самом Python.
Теперь вы знаете Python еще немного лучше)
#tricks#regex#libs
🔻 RT @60PlusAssoc: 60 Plus President @sanuzis said, “On behalf of more than five million senior citizen supporters we applaud Sen @tedcruz for introducing S. 275, the Retirement Freedom Act that will allow individuals to choose to opt out of the #Medicare part A benefit." https://t.co/YU2i7whWK8
June 24, 2021 at 07:52PM
via Twitter
@SenTedCruz
Donald Trump bragged that the U.S. is spending so much money on his war in Iran it has no funds to pay for daycare or healthcare. 💰⚔️
The 79-year-old president made the boast during a typically rambling speech while hosting an Easter lunch at the White House on Wednesday. 🦅🍽
“The United States can’t take care of daycare. That has to be up to a state,” Trump said. “We’re a big country. We have 50 states. We have all these other people, we’re fighting wars. We can’t take care of daycare. You’ve got to let a state take care of daycare, and they should pay for it too.” 🏛💼
“Medicaid, Medicare, all these individual things. They can do it on a state basis. You can’t do it on a federal [level]. We have to take care of one thing: military protection—we have to guard the country. But all these little things, all these little scams that have taken place, you have to let states take care of them.” 🎖🛡
#Trump#Medicare
👂More on Trump's Ear
⚠️
Summed AI Secures $500K Funding
Summed AI has raised $500K in funding to enhance its AI-driven platform that streamlines Medicare sales calls. The innovative technology allows users to access Medicare plan benefit details 90% faster, improving client enrollment and retention processes. For more information, visit Summed AI.
#Funding#AI#Medicare#Healthcare
🏥💸20 MILLION AMERICANS HIT BY HEALTHCARE "SUBSIDY CLIFF" — PREMIUMS DOUBLE OVERNIGHT
🔹 Congress failed to extend enhanced ACA subsidies expiring Dec 31 — families face 100%+ premium hikes starting January 2026 📈
🔹 Medicare Part B premiums jump $17.90/month to $202.90, eating away entire 2.8% Social Security COLA increase 💰
🔹 Social Security taxable earnings cap rises to $184,500 from $176,100 — higher earners pay more into system 📊
🔹 New senior tax deductions passed but millions may drop coverage entirely due to affordability crisis 🚨
Congress left 20 million hanging while pharma lobbies got their wins 😡🔥
#Healthcare#Medicare
@america
💥 Social Security and Medicare on the brink of disaster! 💔😢
Trust funds rapidly depleting, retirees in jeopardy 😱
Benefit cuts looming, up to 23% reduction! 💔💸
Healthcare access at risk, hospitals facing delays! 🏥😷
Presidential candidates must address this crisis! 🗳️🤔
Bipartisan solutions needed, time is running out! ⏰🤝
Fiscal commission proposed for comprehensive action! 💪💼
Let's save these vital programs for future generations! 🙏🌍
#SocialSecurity#Medicare#RetirementCrisis#BipartisanSolutions
https://www.foxbusiness.com/politics/social-security-trust-fund-path-insolvency
Subscribe to @BadVolfNews
#The_Barron's 🇺🇸📕[PDF]⬇️
3 #November2025
#Weekly_Magazines
For learning, for free(dom).
@backupofmagazines
Barron’s says Boeing is back, as new leadership tackles years of crises. A warning on “crypto-treasury” firms shows #Bitcoin risk. #Meta’s AI buildout has flaws, while funds that track #Buffett surge. Don’t count out the #Jobs market; the classic 60/40 portfolio is hot again. Features span medical devices, housing-broker disruption, dividend diversification, and mortgage #REITs. Global angles include Gulf states’ #AI push and Argentina’s reform shot. Columns debate #Fed signals, tech overspending, and Musk’s trillion-dollar gambit, plus strategies to lower #Taxes and a key #Medicare to-do for retirees. #Stocks#Markets#Investing#Boeing#Economy#ETFs