PYTHONJUNIORJOB Telegram 839
#вопрос242

Создайте регулярное выражение для проверки того, является ли строка валидным числом с плавающей точкой. Обратите внимание: написать нужно паттерн, а не функцию.

Примеры:

pattern = "ваш_паттерн"
bool(re.match(pattern, "12.12")) ➞ True
bool(re.match(pattern, "12.")) ➞ False
bool(re.match(pattern, ".1")) ➞ True
bool(re.match(pattern, "-.1")) ➞ True
bool(re.match(pattern, "+4.4")) ➞ True
bool(re.match(pattern, "+4")) ➞ False
bool(re.match(pattern, "+4.4av")) ➞ False
👏2👍1



tgoop.com/pythonjuniorjob/839
Create:
Last Update:

#вопрос242

Создайте регулярное выражение для проверки того, является ли строка валидным числом с плавающей точкой. Обратите внимание: написать нужно паттерн, а не функцию.

Примеры:

pattern = "ваш_паттерн"
bool(re.match(pattern, "12.12")) ➞ True
bool(re.match(pattern, "12.")) ➞ False
bool(re.match(pattern, ".1")) ➞ True
bool(re.match(pattern, "-.1")) ➞ True
bool(re.match(pattern, "+4.4")) ➞ True
bool(re.match(pattern, "+4")) ➞ False
bool(re.match(pattern, "+4.4av")) ➞ False

BY Python вопросы на собеседовании с ответами


Share with your friend now:
tgoop.com/pythonjuniorjob/839

View MORE
Open in Telegram


Telegram News

Date: |

During the meeting with TSE Minister Edson Fachin, Perekopsky also mentioned the TSE channel on the platform as one of the firm's key success stories. Launched as part of the company's commitments to tackle the spread of fake news in Brazil, the verified channel has attracted more than 184,000 members in less than a month. Just as the Bitcoin turmoil continues, crypto traders have taken to Telegram to voice their feelings. Crypto investors can reduce their anxiety about losses by joining the “Bear Market Screaming Therapy Group” on Telegram. Click “Save” ; Earlier, crypto enthusiasts had created a self-described “meme app” dubbed “gm” app wherein users would greet each other with “gm” or “good morning” messages. However, in September 2021, the gm app was down after a hacker reportedly gained access to the user data. Select “New Channel”
from us


Telegram Python вопросы на собеседовании с ответами
FROM American