These are chat archives for ipython/ipython

25th
Sep 2017
daltorya19
@daltorya19
Sep 25 2017 12:30
could someone please help me quickly?
print('you just tried to bet','$'+int(bet),'but you only have $'+str(money))
TypeError: must be str, not int
jldiaz
@jldiaz_twitter
Sep 25 2017 14:57
@daltorya19 Trying to add '$' + int(bet) triggers the error. '$' is string, but int(bet) is integer
@daltorya19 use '$' + str(bet) instead, as you did with money
@daltorya19 Even better, use string format: print('you just tried to bet ${} but you only have ${}'.format(bet, money))