Answer - C
Explanation -
print(10 + 3 if '123'.isdigit() else 2 + 5) will be similar to
print(13 if '123'.isdigit() else 7)
The isdigit() method returns True if all the characters are digits, otherwise False.
As the if statement '123'.isdigit() is true hence 13 will be the output.
--------------------------------------------------------------------------
Music:RU-vid Audio Library
--------------------------------------------------------------------------
Thanks for watching.
Do like, share and subscribe.
4 сен 2024