として、私は文字列としての機能を使用したいが、私はこの機能を持っている:Pythonの利用機能文字列
def getCoins(user): ##Get the Coins from a user.##
try:
with open(pathToUser + user + ".txt") as f:
for line in f:
print(user + " has " + line +" coins!")
except:
print("Error!")
は今、それだけでコインを印刷し、しかし、私はこのような他のコードでそれを使用したい:
client.send_msg(m.text.split(' ')[2] + "has" + coinapi.getCoins('User') + "coins")
どうすればよいですか? Twitchchatのメッセージは文字列のように使うことができるので、
"USERXYZ has 100 coins"