@MyGovCoronaNewsdesk · Post #13194 · 24.06.2024 г., 09:43
#GST
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #65 · 8 апр.
Небольшой трик с регулярными выражениями который редко вижу в чужом коде. Допустим, вам нужно распарсить простой текст и вытащить оттуда пары имя+телефон. Вернуть всё это надо в виде списка словарей. Возьмем очень простой пример текста. >>> text = ''' >>> Alex:8999123456 >>> Mike:+799987654 >>> Oleg:+344456789 >>> ''' Соответственно, для выделения нужных элементов будем использовать группы. Получится такой паттерн: (\w+):([\d+]+) Как мы будем формировать словарь из найденных групп? >>> import re >>> results = [] >>> for match in re.finditer(r"(\w+):([\d+]+)", text): >>> results.append({ >>> "name": match.group(1), >>> "phone": match.group(2) >>> }) >>> print(results) [{'name': 'Alex', 'phone': '8999123456'}, ...] Можно немного сократить запись используя zip >>> results = [] >>> for match in re.finditer(r"(\w+):([\d+]+)", text): >>> results.append(dict(zip(['name', 'phone'], match.groups()))) Но есть способ лучше! Это именованные группы в regex. Можно в паттерне указать имя группы и результат сразу забрать в виде словаря. >>> for match in re.finditer(r"(?P<name>\w+):(?P<phone>[\d+]+)", text): >>> results.append(match.groupdict()) То есть всё что я сделал, это добавил в начале группы (внутри сбокочек) такую запись: (?P<group-name>...) Теперь найденная группа имеет имя и можно обратиться к ней как к элементу списка >>> name = match['name'] Либо забрать сразу весь словарь методом groupdict() >>> match.groupdict() #tricks#regex
Пребарај: #gst
@MyGovCoronaNewsdesk · Post #13194 · 24.06.2024 г., 09:43
#GST
Hashtags
@Govsg · Post #1890 · 31.12.2023 г., 06:13
With the #GST rate change on 1 Jan 2024, here are some scenarios you may find yourself in. 👉🏻 Swipe to find out how the rate change affects your ongoing or upcoming transactions. 📷: @irassg More info here: go.gov.sg/GSTratechange2024
Hashtags
@MyGovCoronaNewsdesk · Post #12658 · 02.05.2023 г., 13:47
India's #GST collections hit an all-time high, a true testament to a stronger economy and progress #EconomicGrowth
Hashtags
@dreago_news_ch · Post #262916 · 13.05.2026 г., 08:12
🔔 GST 주가, 5월 13일 66,500원 4.40% 상승 마감 📈#GST 📝#코스닥#증권 주요 주가 상승이 확인되었으나, PER이 업종 평균보다 낮아 추가 상승 여력이 다소 제한적일 수 있습니다. ⬜⬜⬜⬜⬜│🟥⬜⬜⬜⬜ 【 겁나빠른 #드리고봇 뉴스 】 https://www.topstarnews.net/news/articleView.html?idxno=16059597
@irassg · Post #725 · 22.12.2023 г., 06:30
Navigate the right GST rate to pay for transactions spanning the rate change with new mummy and her bestie! 💁♀️💡 A transaction is considered to span the GST rate change if one or two of the following events takes place wholly or partially on/after 1 Jan 2024: - The issuance of invoice by supplier - The receipt of payment by supplier - The delivery of goods or performance of services More info at go.gov.sg/irasgst-rc-consumers #GST#GSTRateChange#skit#iras#irassg
@irassg · Post #723 · 20.12.2023 г., 09:10
🎵 We carry through, do what we need to do~ Yes, I’m a GST-registered business just like you 🎵 Here are 3 key things GST-registered businesses need to prepare for the 2024 GST rate change: 1) Update systems to incorporate 9% GST from 1 Jan 2024 2) Prepare price displays to reflect 9% GST from 1 Jan 2024 3) Understand transitional rules to apply the correct GST rate for transactions spanning 1 Jan 2024 Learn more at go.gov.sg/irasgst-rc-businesses #GST#GSTRateChange#iamjustlikeyou#iras#irassg