Unnecessary quotes in modulus operator
category = 'A'
num = 10
print("This is from category '%s' and we have '%d' left." %(category, num)) will produce
This is from category 'A' and we have '10' left.
while print("This is from category %s and we have %d left." %(category, num)) produces
This is from category A and we have 10 left.
which is probably what you want.
1 answers ( 0 marked as helpful)
Thanks for reaching out.
Thanks for sharing this piece of information with the Community!
What is the question? Thank you.
Looking forward to your answer.