import telebot
pip3 install pytelegrambotapi,telebot
Сработает ли, если я тупо скопирую папку "Python38-32" со старого системного диска на новый в ту же директорию?
python -m pip freeze > requirements.txt
pip install -r requirements.txt
import re
text = 'hi man! how are you?'
keyword = 'hi'
matched_string = re.search(rf'\b{keyword}\b.{{0,5}}', text)
if matched_string:
matched_string = matched_string.group(0)
print(matched_string)