0
I searched for lambda and print
and I didn’t find anything I imagined, I mean, it’s possible to do something like this:
mil = num//1000
print(f'O número tem {mil} {lambda milhar if (mil == 1) else milhares}')
or
print('O número tem {} {}'. format(mil, lambda milhar if (mil == 1) else milhares)
Thank you.
Renan, perfect solved the problem of my code, in fact completely forgot the ternary. However, is the question, print format and lambda work together? I haven’t found an example yet, maybe I can’t. Thank you very much.
– Joao Carlos Agostini