@american_observer · Post #5320 · 08.03.2026 г., 19:59
#bolton#iran#war 📱American Оbserver - Stay up to date on all important events 🇺🇸
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #32 · 7 фев.
Скорее всего уже слышали, что складывать строки через + это плохая практика. Падение производительности, и всё такое. Без лишних слов, давайте измерять: from timeit import timeit def t1(): # складываем 10 строк через + из переменной t = 'text' for _ in range(1000): s = t + t + t + t + t + t + t + t + t def t2(): # склеиваем список строк через метод join arr = ['text'] * 10 for _ in range(1000): s = ''.join(arr) def t3(): # складываем через + но не из переменной а непосредственно инлайн объекты for _ in range(1000): s = 'text' + 'text' + 'text' + ... # всего 10 раз Теперь каждую строку склейки запустим по 10М раз >>> timeit(t1, number=10000) 0.21951690399964718 >>> timeit(t2, number=10000) 1.4978306379998685 >>> timeit(t3, number=10000) 0.2213820789993406 Хм, а нам говорили что через "+" это плохо и медленно ))) 😁 Тут стоит учитывать, что речь идёт о склейке множества длинных строк. Давайте изменим условия: def t4(): t = 'text'*100 for _ in range(1000): s = t + t + t + t + t + t + t + t + t def t5(): arr = ['text'*100] * 10 for _ in range(1000): s = ''.join(arr) def t6(): for _ in range(1000): s = 'text'*100 + 'text'*100 + ... # всего 10 раз >>> timeit(t4, number=10000) 12.795130728000004 >>> timeit(t5, number=10000) 2.642637542999182 >>> timeit(t6, number=10000) 0.2184546610005782 Вот, уже другой разговор, сразу видна разница, в среднем в 6 раз. Но погодите, почему последний тест t6() по скорости такой же как и t3()? Ведь строки теперь в 100 раз длиннее! Это вопросы оптимизации кода, какие простые изменения ускоряют или замедляют выполнение программы. Мы столкнулись с примером обхода обращения к переменной. Например, именно так работает директива #define в С++, во время компиляции подставляя значение переменной вместо ссылки на неё. В Python это тоже работает, но часто ли вы сможете встретить такой способ работы со строками? К сожалению, способ почти только теоретический. В целом, тесты показали то, что мы хотели. Делаем выводы самостоятельно. Полный листинг 🌍 #tricks
Пребарај: #bolton
@american_observer · Post #5320 · 08.03.2026 г., 19:59
#bolton#iran#war 📱American Оbserver - Stay up to date on all important events 🇺🇸
@trumpsear_tg · Post #1399 · 22.08.2025 г., 14:01
FBI agents came to search Trump's former adviser John Bolton 🔍, who has been frequently criticizing the president lately 😠. A source told The New York Post that the case is related to classified documents 📂. "No one is above the law," FBI Director Cash Patel wrote amid reports of searches at Bolton's home ⚖️. According to the newspaper, it was on Patel's instructions that the investigation was launched 🕵️♂️. Bolton also criticized Trump's approach to negotiations with Russia 🇷🇺. In mid-August, before the Alaska summit, he said that Russian President Vladimir Putin "has already won." The American president then called his ex-adviser a "stupid man" 🤦♂️. #Trump#FBI#Bolton 👂More on Trump's Ear ⚠️
@american_observer · Post #5421 · 19.03.2026 г., 20:04
#bolton#interview 📱American Оbserver - Stay up to date on all important events 🇺🇸
Hashtags
@UltimoraPOlitics · Post #38453 · 06.05.2022 г., 01:43
#Elezioni#RegnoUnito#Amministrative Consiglio di #Bolton, risultati definitivi: #CON|ECR: 9 (+1 rispetto al 2018) #LAB|S&D: 8 (+1) #LDEM|RE: 2 One Kearsley: 1 (+1) Farnworth and Kearsley First: 0 (-1) Attuale composizione del Consiglio comunale: #CON|ECR: 23 seggi #LAB|S&D: 19 Indipendenti: 7 #LDEM|RE: 5 Farnworth and Kearsley First: 4 Horwich and Blackrod First: 2 One Kearsley: 1 Il Consiglio rimane senza controllo. @UltimoraPolitics
@trumpsear_tg · Post #1408 · 25.08.2025 г., 15:02
🔍FBI agents searched the house of Trump's former national security adviser because of a book 📖 The investigation is related to the disclosure of classified information in the memoirs of former councilman Bolton entitled “The Room Where It Happened: a White House Memoir” published in 2020. 📚 As the New York Post recalls, Trump tried to prevent the publication of the book, claiming that Bolton violated the non-disclosure agreement that he signed when he was hired. 🚫 #agents#FBI#bolton#trump 👂More on Trump's Ear ⚠️
@american_observer · Post #5212 · 24.02.2026 г., 16:19
Former US National Security Advisor John Bolton: “Although you could potentially remove the ayatollah, that would leave the IRGC in place, and the government in Iran is the IRGC, while the ayatollahs act as a religious cover or an ideological cover for them. I think Trump is just hoping that this show of American power will intimidate the ayatollahs. If I were still his adviser, I would be happy to tell him that it won’t work. They won’t be intimidated. But Trump really thinks minute by minute; he doesn’t think strategically.” #john#bolton#trump#ayatollah 📱American Оbserver - Stay up to date on all important events 🇺🇸
Hashtags