Answer the question
In order to leave comments, you need to log in
If statement in python?
I am learning python from the book A Byte of Python. There are lines of code like this
if os.system(zip_command) == 0:
print("Резервная копия успешно создана в", target)
else:
print("Создание резервной копии НЕ УДАЛОСЬ")
Answer the question
In order to leave comments, you need to log in
1. Yes, that's about it.
2. The condition says "the result of the function execution is compared with zero". To find out the result of the execution, the function must be executed. So the command will definitely start.
listen, don’t worry,
take an IDE and write the code, the
alignment there is like this - if you managed to run something in the line, then return 0, otherwise the error is,
and what’s there and how is it in the line - you won’t know in any way, to find out - other commands - that is, you let it go and it fell out in a second - it still returned 0
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question