Answer the question
In order to leave comments, you need to log in
How to split string in vk_api in python?
In general, I know how to make an answer to the exact message, but let's say I want to make a command to the bot:! Say the text. But it's not clear to me how to make it so that he gets that text after the word! say
Answer the question
In order to leave comments, you need to log in
command = '!скажи текст'
print(command[7:])
#текст
command2 = '!скажи много текста'
print(command2[7:])
#много текста
command = '!скажи текст'
print(command.split(' ')[1])
#текст
command = '!скажи текст'
print(command.replace('!скажи ',''))
#текст
command = '!скажи текст'
print((command[::-1][0:len(command[::-1])-7])[::-1])
#текст
import base64
command = '!скажи текст'
t = 'KGNvbW1hbmRbOjotMV1bMDpsZW4oY29tbWFuZFs6Oi0xXSktN10pWzo6LTFd'
print(eval(compile(base64.b64decode(t),'<string>', 'eval')))
#текст
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question