Python で複数の入力を許可する方法を知りたいです。
例: メッセージが「!comment postid customcomment」の場合、
その投稿 ID を取得して、それをどこかに置き、次に customcomment を置き、それを別の場所に置きたいと考えています。
これが私のコードです:
import fb
token="access_token_here"
facebook=fb.graph.api(token)
#__________ Later on in the code: __________
elif msg.startswith('!comment '):
postid = msg.replace('!comment ','',1)
send('Commenting...')
facebook.publish(cat="comments", id=postid, message="customcomment")
send('Commented!')
私はそれを理解できないようです。
よろしくお願いします。