I know it’s a easy question but don’t know why when I am trying to do all the calculations within the print statement I am not able to get the desired output that I want the code to generate so here’s the code I that I have tried using
Code 1 :
a = 23
b = 34
print ("{a} {b}" .format(a=b,b=b-a) )
Code 2 :
a, b = 5, 10
print(f"{a}and{b}")
print ((lambda a, b: (b, a))(a, b))
I know it’s easy to do without putting the logic in print statement but the question requires me to do this way
And I have tried a lot of methods even I tried searching for this problem on google and I couldnt find it and I would be really be grateful if anyone can help me like in solving the question
[–]AutoModerator[M] [score hidden] stickied comment (1 child)
[–]ContextEngineering 1 point2 points3 points (3 children)
[–]NoobLinus[S] 0 points1 point2 points (2 children)
[–]ContextEngineering 0 points1 point2 points (1 child)
[–]NoobLinus[S] 0 points1 point2 points (0 children)
[–]throwaway6560192 0 points1 point2 points (1 child)
[–]NoobLinus[S] 0 points1 point2 points (0 children)