+ 1

Please help me to explain this code step by step

nums = (55, 44, 33, 22) print(max(min(nums[:2]), abs([-42])))

16th Mar 2021, 10:38 PM
Muhammad Abdulmalik
Muhammad Abdulmalik - avatar
3 Antworten
+ 3
Solution in code👇 https://code.sololearn.com/cVC8FRG2x3DJ/?ref=app I hope you understand
16th Mar 2021, 10:50 PM
!Derrickee
!Derrickee - avatar
0
so 1st we split that line so we can understand it better . 1- nums[:2] = [55,44] 2- min(nums[:2]) =min([55,44])=44 3- abs(-42) = 42 4- max(44,42) it will be 44
17th Mar 2021, 12:58 AM
Med Amine Fh
Med Amine Fh - avatar
0
@ <Derrickee/> thank you so much I really understand.
18th Mar 2021, 11:22 PM
Muhammad Abdulmalik
Muhammad Abdulmalik - avatar