I am new to programing and I am trying to print:
money = 5000
print(f'Your account has ${ {money:,} if money > 0 else "nothing"}.')
I want it to print "Your account has $5,000." but when I run it comes back as
( {money:,} if money > 0 else "nothing")
^
SyntaxError: f-string: invalid syntax
yet if I do it by itself:
money = 5000
print(f'Your account has ${money:,}.')
>>>Your account has $5,000.
it works with just one pair: { }. How can I make the first one work with two pairs: { { } }?