Python Boolean: полное руководство

–õ–æ–≥–∏—á–µ—Å–∫–∏–π —Ç–∏–ø –¥–∞–Ω–Ω—ã—Ö Python –∏–º–µ–µ—Ç —Ç–æ–ª—å–∫–æ –¥–≤–∞ –≤–æ–∑–º–æ–∂–Ω—ã—Ö —Å–æ—Å—Ç–æ—è–Ω–∏—è: –∫–ª—é—á–µ–≤—ã–µ —Å–ª–æ–≤–∞ False –∏ True . –õ–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è –Ω–µ –º–æ–≥—É—Ç —Å–æ–¥–µ—Ä–∂–∞—Ç—å –Ω–∏–∫–∞–∫–∏—Ö –¥—Ä—É–≥–∏—Ö –∑–Ω–∞—á–µ–Ω–∏–π –∏ —è–≤–ª—è—é—Ç—Å—è –Ω–∞–∏–º–µ–Ω—å—à–∏–º —Ç–∏–ø–æ–º –¥–∞–Ω–Ω—ã—Ö. –õ–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è –Ω–µ–æ–±—Ö–æ–¥–∏–º—ã –¥–ª—è –º–Ω–æ–≥–∏—Ö –∞—Å–ø–µ–∫—Ç–æ–≤ –ø—Ä–æ–≥—Ä–∞–º–º–∏—Ä–æ–≤–∞–Ω–∏—è, –Ω–∞–ø—Ä–∏–º–µ—Ä –¥–ª—è –∏—Å–ø–æ–ª—å–∑–æ–≤–∞–Ω–∏—è –æ–ø–µ—Ä–∞—Ç–æ—Ä–æ–≤ if.

–ü—Ä–∏–º–µ—á–∞–Ω–∏–µ –æ –∑–∞–≥–ª–∞–≤–Ω—ã—Ö –±—É–∫–≤–∞—Ö. –°–ª–æ–≤–æ Boolean, –Ω–∞–∑–≤–∞–Ω–Ω–æ–µ –≤ —á–µ—Å—Ç—å –º–∞—Ç–µ–º–∞—Ç–∏–∫–∞ –î–∂–æ—Ä–¥–∂–∞ –ë—É–ª—è, –≤—Å–µ–≥–¥–∞ –ø–∏—à–µ—Ç—Å—è —Å –∑–∞–≥–ª–∞–≤–Ω–æ–π –±—É–∫–≤—ã. –ö—Ä–æ–º–µ —Ç–æ–≥–æ, —Å–ª–æ–≤–∞ True –∏ False –≤ Python –ø–∏—à—É—Ç—Å—è —Å –∑–∞–≥–ª–∞–≤–Ω–æ–π –±—É–∫–≤—ã, –ø–æ—Ç–æ–º—É —á—Ç–æ –æ–Ω–∏ —è–≤–ª—è—é—Ç—Å—è –∑–∞—Ä–µ–∑–µ—Ä–≤–∏—Ä–æ–≤–∞–Ω–Ω—ã–º–∏ –∫–ª—é—á–µ–≤—ã–º–∏ —Å–ª–æ–≤–∞–º–∏ –≤ —è–∑—ã–∫–µ –ø—Ä–æ–≥—Ä–∞–º–º–∏—Ä–æ–≤–∞–Ω–∏—è.

–ß—Ç–æ–±—ã –ø–æ–º–æ—á—å –≤–∞–º –Ω–∞—á–∞—Ç—å —Ä–∞–±–æ—Ç—É —Å Python. Booleans, –º—ã –Ω–∞–ø–∏—Å–∞–ª–∏ —ç—Ç–æ—Ç —É—á–µ–±–Ω–∏–∫ –ø–æ –æ—Å–Ω–æ–≤–∞–º –ª–æ–≥–∏–∫–∏. –ú—ã –æ–±—Å—É–¥–∏–º, –∫–∞–∫ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –ª–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è –¥–ª—è –æ—Ü–µ–Ω–∫–∏ –ø–µ—Ä–µ–º–µ–Ω–Ω—ã—Ö –∏ –≤—ã—Ä–∞–∂–µ–Ω–∏–π. –ò –º—ã –ø–æ–∫–∞–∂–µ–º, –∫–∞–∫ –ª–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è –º–æ–≥—É—Ç –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å—Å—è —Å –û–ø–µ—Ä–∞—Ç–æ—Ä—ã Python if –¥–ª—è —É–ø—Ä–∞–≤–ª–µ–Ω–∏—è –ø–æ—Ç–æ–∫–æ–º –ø—Ä–æ–≥—Ä–∞–º–º—ã.

Python Boolean

–õ–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è –∏—Å–ø–æ–ª—å–∑—É—é—Ç—Å—è –¥–ª—è –ø—Ä–µ–¥—Å—Ç–∞–≤–ª–µ–Ω–∏—è –∑–Ω–∞—á–µ–Ω–∏–π –∏—Å—Ç–∏–Ω–Ω–æ—Å—Ç–∏, –∏ –æ–Ω–∏ –ø—Ä–æ–∏–∑–≤–æ–¥—è—Ç –∏–∑ –º–∞—Ç–µ–º–∞—Ç–∏–∫–∏ –∏ –∞—Ä–∏—Ñ–º–µ—Ç–∏–∫–∏. –§–∞–∫—Ç–∏—á–µ—Å–∫–∏, –ª–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è —è–≤–ª—è—é—Ç—Å—è —Å—Ç—Ä–æ–∏—Ç–µ–ª—å–Ω—ã–º–∏ –±–ª–æ–∫–∞–º–∏ —Å–ª–æ–∂–Ω—ã—Ö –∞–ª–≥–æ—Ä–∏—Ç–º–æ–≤. –ü—Ä–∏ –ø—Ä–æ–≥—Ä–∞–º–º–∏—Ä–æ–≤–∞–Ω–∏–∏ –≤—ã –∏—Å–ø–æ–ª—å–∑—É–µ—Ç–µ –ª–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è –¥–ª—è –æ—Ü–µ–Ω–∫–∏ –≤—ã—Ä–∞–∂–µ–Ω–∏–π –∏ –≤–æ–∑–≤—Ä–∞—Ç–∞ —Ä–µ–∑—É–ª—å—Ç–∞—Ç–∞, –∫–æ—Ç–æ—Ä—ã–π –º–æ–∂–µ—Ç –±—ã—Ç—å True –∏–ª–∏ False.

–í–æ—Ç –ø—Ä–∏–º–µ—Ä –ª–æ–≥–∏—á–µ—Å–∫–æ–≥–æ –∑–Ω–∞—á–µ–Ω–∏—è, –∫–æ—Ç–æ—Ä–æ–µ Python –∏—Å–ø–æ–ª—å–∑—É–µ—Ç –¥–ª—è —Ö—Ä–∞–Ω–µ–Ω–∏—è –¥–∞–Ω–Ω—ã—Ö –æ —Ç–æ–º, –ª–µ—Ç–æ —Å–µ–π—á–∞—Å:

–ù–∞—à –ø–∞—Ä–∞–º–µ—Ç—Ä –æ—Ü–µ–Ω–∏–≤–∞–µ—Ç—Å—è –∫–∞–∫ False, —á—Ç–æ –æ–∑–Ω–∞—á–∞–µ—Ç, —á—Ç–æ —ç—Ç–æ –Ω–µ —Ç–∞–∫. –ª–µ—Ç–æ. –ù–∏–∂–µ –ø—Ä–∏–≤–µ–¥–µ–Ω—ã —ç–ª–µ–º–µ–Ω—Ç—ã —ç—Ç–æ–≥–æ –æ–ø–µ—Ä–∞—Ç–æ—Ä–∞ Python:

–≠–ª–µ–º–µ–Ω—Ç –ü—Ä–∏–º–µ—Ä
–ø–µ—Ä–µ–º–µ–Ω–Ω–∞—è " is_summer "
–æ–ø–µ—Ä–∞—Ç–æ—Ä " = "
–∑–Ω–∞—á–µ–Ω–∏–µ " False "

–ü—Ä–∏ –ø—Ä–æ–≥—Ä–∞–º–º–∏—Ä–æ–≤–∞–Ω–∏–∏ –º—ã –ø—Ä–∏—Å–≤–∞–∏–≤–∞–µ–º –ø–µ—Ä–µ–º–µ–Ω–Ω–æ–π Python –ª–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è; –∑–Ω–∞—á–µ–Ω–∏–µ –º–æ–∂–µ—Ç –±—ã—Ç—å —Ä–∞–≤–Ω–æ —Ç–æ–ª—å–∫–æ True –∏–ª–∏ False.

81% —É—á–∞—Å—Ç–Ω–∏–∫–æ–≤ –∑–∞—è–≤–∏–ª–∏, —á—Ç–æ –æ–Ω–∏ –ø–æ—á—É–≤—Å—Ç–≤–æ–≤–∞–ª–∏ —Å–µ–±—è –±–æ–ª–µ–µ —É–≤–µ—Ä–µ–Ω–Ω—ã–º–∏ –≤ —Å–≤–æ–∏—Ö –ø–µ—Ä—Å–ø–µ–∫—Ç–∏–≤–∞—Ö —Ç—Ä—É–¥–æ—É—Å—Ç—Ä–æ–π—Å—Ç–≤–∞ –ø–æ—Å–ª–µ –ø–æ—Å–µ—â–µ–Ω–∏—è —É—á–µ–±–Ω–æ–≥–æ –ª–∞–≥–µ—Ä—è. –ü—Ä–æ–π–¥–∏—Ç–µ –∫—É—Ä—Å –æ–±—É—á–µ–Ω–∏—è —Å–µ–≥–æ–¥–Ω—è.

–°—Ä–µ–¥–Ω–∏–π –≤—ã–ø—É—Å–∫–Ω–∏–∫ —É—á–µ–±–Ω–æ–≥–æ –ª–∞–≥–µ—Ä—è –ø–æ—Ç—Ä–∞—Ç–∏–ª –º–µ–Ω–µ–µ —à–µ—Å—Ç–∏ –º–µ—Å—è—Ü–µ–≤ –Ω–∞ –ø–µ—Ä–µ—Ö–æ–¥–Ω—É—é –∫–∞—Ä—å–µ—Ä—É, –æ—Ç –Ω–∞—á–∞–ª–∞ —É—á–µ–±–Ω–æ–≥–æ –ª–∞–≥–µ—Ä—è –¥–æ –ø–æ–∏—Å–∫–∞ —Å–≤–æ–µ–π –ø–µ—Ä–≤–æ–π —Ä–∞–±–æ—Ç—ã.

–°—Ä–∞–≤–Ω–µ–Ω–∏–µ - —ç—Ç–æ –æ—Å–æ–±–µ–Ω–Ω–æ—Å—Ç—å –ø—Ä–æ–≥—Ä–∞–º–º–∏—Ä–æ–≤–∞–Ω–∏—è. –∫–æ—Ç–æ—Ä—ã–µ –ø–æ–∑–≤–æ–ª—è—é—Ç —Å—Ä–∞–≤–Ω–∏–≤–∞—Ç—å –æ–ø–µ—Ä–∞–Ω–¥—ã –∏ –≤–æ–∑–≤—Ä–∞—â–∞—Ç—å –∑–Ω–∞—á–µ–Ω–∏–µ True –∏–ª–∏ False –Ω–∞ –æ—Å–Ω–æ–≤–µ —Å—Ä–∞–≤–Ω–µ–Ω–∏—è.

–ù–∞–ø—Ä–∏–º–µ—Ä, —Å–∫–∞–∂–µ–º, –≤—ã —Å–æ–∑–¥–∞–µ—Ç–µ –ø—Ä–æ–≥—Ä–∞–º–º—É, –∫–æ—Ç–æ—Ä–∞—è –≤—ã—á–∏—Å–ª—è–µ—Ç —Å–∞–º–æ–µ –≤—ã—Å–æ–∫–æ–µ –∑–¥–∞–Ω–∏–µ –≤ –º–∏—Ä–µ. –ß—Ç–æ–±—ã –≤–∞—à–∞ –ø—Ä–æ–≥—Ä–∞–º–º–∞ —Ä–∞–±–æ—Ç–∞–ª–∞, –≤—ã –º–æ–∂–µ—Ç–µ —Å—Ä–∞–≤–Ω–∏—Ç—å –Ω–µ—Å–∫–æ–ª—å–∫–æ –ª–æ–≥–∏—á–µ—Å–∫–∏—Ö –ø–∞—Ä–∞–º–µ—Ç—Ä–æ–≤ –∏–ª–∏ –∑–Ω–∞—á–µ–Ω–∏–π Python, —á—Ç–æ–±—ã –æ–ø—Ä–µ–¥–µ–ª–∏—Ç—å —Å–∞–º—ã–µ –≤—ã—Å–æ–∫–∏–µ. –î–ª—è —ç—Ç–æ–≥–æ –≤—ã –º–æ–∂–µ—Ç–µ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å —Ç–∏–ø –¥–∞–Ω–Ω—ã—Ö Boolean.

–û–ø–µ—Ä–∞—Ç–æ—Ä—ã Python

–ü–æ–º–∏–º–æ –∞—Ä–∏—Ñ–º–µ—Ç–∏—á–µ—Å–∫–∏—Ö –æ–ø–µ—Ä–∞—Ç–æ—Ä–æ–≤, —Å—É—â–µ—Å—Ç–≤—É–µ—Ç —Ä—è–¥ –õ–æ–≥–∏—á–µ—Å–∫–∏–µ –æ–ø–µ—Ä–∞—Ç–æ—Ä—ã Python –∏ –æ–ø–µ—Ä–∞—Ç–æ—Ä—ã —Å—Ä–∞–≤–Ω–µ–Ω–∏—è. –í—ã –º–æ–∂–µ—Ç–µ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å —ç—Ç–∏ –æ–ø–µ—Ä–∞—Ç–æ—Ä—ã –¥–ª—è —Å—Ä–∞–≤–Ω–µ–Ω–∏—è –∑–Ω–∞—á–µ–Ω–∏–π –∏–ª–∏ –æ–ø–µ—Ä–∞–Ω–¥–æ–≤ . –ù–∏–∂–µ –ø—Ä–∏–≤–æ–¥–∏—Ç—Å—è —Ç–∞–±–ª–∏—Ü–∞ –æ–ø–µ—Ä–∞—Ç–æ—Ä–æ–≤ —Å—Ä–∞–≤–Ω–µ–Ω–∏—è –∏ —Å–≤—è–∑–∞–Ω–Ω—ã—Ö —Å–∏–º–≤–æ–ª–æ–≤ Python:

–û–ø–µ—Ä–∞—Ç–æ—Ä —Å—Ä–∞–≤–Ω–µ–Ω–∏—è –°–∏–º–≤–æ–ª –û–ø–∏—Å–∞–Ω–∏–µ
== —Ä–∞–≤–Ω–æ
! = –Ω–µ —Ä–∞–≤–Ω–æ
" –±–æ–ª—å—à–µ
" –º–µ–Ω—å—à–µ
" = –±–æ–ª—å—à–µ –∏–ª–∏ —Ä–∞–≤–Ω–æ
"= –º–µ–Ω—å—à–µ –∏–ª–∏ —Ä–∞–≤–Ω–æ

–ß—Ç–æ–±—ã –¥–æ–ø–æ–ª–Ω–∏—Ç–µ–ª—å–Ω–æ –ø—Ä–æ–∏–ª–ª—é—Å—Ç—Ä–∏—Ä–æ–≤–∞—Ç—å, –∫–∞–∫ –õ–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è —Ä–∞–±–æ—Ç–∞—é—Ç –≤ Python, –ø–æ–∑–≤–æ–ª—å—Ç–µ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥—Ä—É–≥–æ–π –ø—Ä–∏–º–µ—Ä. –î–æ–ø—É—Å—Ç–∏–º, —É –Ω–∞—Å –µ—Å—Ç—å –º–∞–≥–∞–∑–∏–Ω –º–æ—Ä–æ–∂–µ–Ω–æ–≥–æ, –∏ –º—ã —Ö–æ—Ç–∏–º –∑–Ω–∞—Ç—å, –∫—É–ø–∏–ª –ª–∏ —É—á–∞—Å—Ç–Ω–∏–∫ –ø—Ä–æ–≥—Ä–∞–º–º—ã –ª–æ—è–ª—å–Ω–æ—Å—Ç–∏ –±–æ–ª–µ–µ –≤–æ—Å—å–º–∏ –ø–∏–Ω—Ç. –≠—Ç–æ –≤–∞–∂–Ω–æ, –ø–æ—Ç–æ–º—É —á—Ç–æ –∫–∞–∂–¥—ã–π –ø–æ–∫—É–ø–∞—Ç–µ–ª—å –ø–æ–ª—É—á–∞–µ—Ç –±–µ—Å–ø–ª–∞—Ç–Ω—É—é –ø–∏–Ω—Ç—É –º–æ—Ä–æ–∂–µ–Ω–æ–≥–æ –ø–æ—Å–ª–µ –ø–æ–∫—É–ø–∫–∏ –≤–æ—Å—å–º–∏. –ø–∏–Ω—Ç.

–ú—ã –º–æ–∂–µ–º –ø—Ä–æ–≤–µ—Ä–∏—Ç—å, –∫—É–ø–∏–ª –ª–∏ –∫–ª–∏–µ–Ω—Ç –±–æ–ª–µ–µ –≤–æ—Å—å–º–∏ –ø–∏–Ω—Ç –º–æ—Ä–æ–∂–µ–Ω–æ–µ —Å –∏—Å–ø–æ–ª—å–∑–æ–≤–∞–Ω–∏–µ–º —Å–ª–µ–¥—É—é—â–∏—Ö —Å—Ç—Ä–æ–∫ –∫–æ–¥–∞:

–ù–∞—à –∫–æ–¥ –≤—ã–≤–æ–¥–∏—Ç False. & Nbsp;

–ö–∞–∫ –≤–∏–¥–∏—Ç–µ, –Ω–∞—à–∞ –ø—Ä–æ–≥—Ä–∞–º–º–∞ –∏—Å–ø–æ–ª—å–∑—É–µ—Ç –æ–ø–µ—Ä–∞—Ç–æ—Ä "–±–æ–ª—å—à–µ —á–µ–º" –¥–ª—è –ø—Ä–æ–≤–µ—Ä—å—Ç–µ, –∫—É–ø–∏–ª –ª–∏ –Ω–∞—à –∫–ª–∏–µ–Ω—Ç –±–æ–ª–µ–µ –≤–æ—Å—å–º–∏ –ø–∏–Ω—Ç. –í —ç—Ç–æ–º —Å–ª—É—á–∞–µ –Ω–∞—à –∫–ª–∏–µ–Ω—Ç –∫—É–ø–∏–ª —Ç–æ–ª—å–∫–æ —à–µ—Å—Ç—å –ø–∏–Ω—Ç –º–æ—Ä–æ–∂–µ–Ω–æ–≥–æ, –ø–æ—ç—Ç–æ–º—É –Ω–∞—à –æ–ø–µ—Ä–∞–Ω–¥ –ø–æ–ª—É—á–∏–ª –æ—Ü–µ–Ω–∫—É False.

–ß—Ç–æ, –µ—Å–ª–∏ –±—ã –º—ã —Ö–æ—Ç–µ–ª–∏ –ø—Ä–æ–≤–µ—Ä–∏—Ç—å, –∫—É–ø–∏–ª –ª–∏ –Ω–∞—à –∫–ª–∏–µ–Ω—Ç —Ä–æ–≤–Ω–æ –≤–æ—Å–µ–º—å –ø–∏–Ω—Ç –º–æ—Ä–æ–∂–µ–Ω–æ–≥–æ? –ú—ã –º–æ–≥–ª–∏ –±—ã –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –æ–ø–µ—Ä–∞—Ç–æ—Ä —Ä–∞–≤–µ–Ω—Å—Ç–≤–∞ (==), –Ω–∞–ø—Ä–∏–º–µ—Ä:

–†–µ–∑—É–ª—å—Ç–∞—Ç–æ–º –Ω–∞—à–µ–≥–æ –∫–æ–¥–∞ —è–≤–ª—è–µ—Ç—Å—è False. & nbsp;

–ü–æ—Å–∫–æ–ª—å–∫—É —É –Ω–∞—à–µ–≥–æ –∫–ª–∏–µ–Ω—Ç–∞ –µ—Å—Ç—å —Ç–æ–ª—å–∫–æ –∫—É–ø–∏–ª —à–µ—Å—Ç—å –ø–∏–Ω—Ç –º–æ—Ä–æ–∂–µ–Ω–æ–≥–æ, –Ω–∞—à–∞ –≤—ã–ø–∏—Å–∫–∞ pints_of_ice_cream_purchased == 8 –±—ã–ª–∞ –æ—Ü–µ–Ω–µ–Ω–∞ –∫–∞–∫ False. –ï—Å–ª–∏ –±—ã –Ω–∞—à –∫–ª–∏–µ–Ω—Ç –∫—É–ø–∏–ª –≤–æ—Å–µ–º—å –ø–∏–Ω—Ç –º–æ—Ä–æ–∂–µ–Ω–æ–≥–æ, –Ω–∞—à–µ –≤—ã—Ä–∞–∂–µ–Ω–∏–µ –±—ã–ª–æ –±—ã –æ—Ü–µ–Ω–µ–Ω–æ –∫–∞–∫ True.

–¢–æ—á–Ω–æ —Ç–∞–∫ –∂–µ –ª–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è –º–æ–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥–ª—è –æ—Ü–µ–Ω–∫–∏ —Ä–µ–∑—É–ª—å—Ç–∞—Ç–∞ —Å—Ä–∞–≤–Ω–µ–Ω–∏—è —Å—Ç—Ä–æ–∫. –î–æ–ø—É—Å—Ç–∏–º, –º—ã —Ö–æ—Ç–∏–º –∑–Ω–∞—Ç—å, –∑–∞–∫–∞–∑–∞–ª –ª–∏ –∫–ª–∏–µ–Ω—Ç –º–æ—Ä–æ–∂–µ–Ω–æ–µ —Å–æ –≤–∫—É—Å–æ–º Triple Chocolate Fudge, –∫–æ—Ç–æ—Ä–æ–µ –Ω–∞—Ö–æ–¥–∏—Ç—Å—è –≤ —Å–µ–∫—Ä–µ—Ç–Ω–æ–º –º–µ–Ω—é. –ú—ã –º–æ–≥–ª–∏ –±—ã –≤—ã–ø–æ–ª–Ω–∏—Ç—å —ç—Ç–æ —Å—Ä–∞–≤–Ω–µ–Ω–∏–µ, –∏—Å–ø–æ–ª—å–∑—É—è —Å–ª–µ–¥—É—é—â–∏–π –∫–æ–¥:

–†–µ–∑—É–ª—å—Ç–∞—Ç–æ–º –Ω–∞—à–µ–≥–æ –∫–æ–¥–∞ —è–≤–ª—è–µ—Ç—Å—è True. & Nbsp;

–ù–∞—à –∫–ª–∏–µ–Ω—Ç –∑–∞–∫–∞–∑–∞–ª Triple –®–æ–∫–æ–ª–∞–¥–Ω–∞—è –ø–æ–º–∞–¥–∫–∞ —Å–æ –≤–∫—É—Å–æ–º –º–æ—Ä–æ–∂–µ–Ω–æ–≥–æ, –ø–æ—ç—Ç–æ–º—É, –∫–æ–≥–¥–∞ –Ω–∞—à–∞ –ø—Ä–æ–≥—Ä–∞–º–º–∞ –æ—Ü–µ–Ω–∏–≤–∞–µ—Ç —ç—Ç–æ, –æ–Ω–∞ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç: True. & Nbsp;

–°—Ç–æ–∏—Ç –æ—Ç–º–µ—Ç–∏—Ç—å, —á—Ç–æ –ø—Ä–∏ —Å—Ä–∞–≤–Ω–µ–Ω–∏–∏ —Å—Ç—Ä–æ–∫ —É—á–∏—Ç—ã–≤–∞–µ—Ç—Å—è —Ä–µ–≥–∏—Å—Ç—Ä. . –ò—Ç–∞–∫, –µ—Å–ª–∏ –±—ã –º—ã –≤–≤–µ–ª–∏ –∑–∞–∫–∞–∑ –∫–ª–∏–µ–Ω—Ç–∞ –∫–∞–∫ —Ç—Ä–æ–π–Ω–∞—è —à–æ–∫–æ–ª–∞–¥–Ω–∞—è –ø–æ–º–∞–¥–∫–∞, –ø—Ä–∏–≤–µ–¥–µ–Ω–Ω—ã–π –≤—ã—à–µ –∫–æ–¥ –≤–µ—Ä–Ω—É–ª –±—ã False.

–û—Ü–µ–Ω–∏—Ç—å –ø–µ—Ä–µ–º–µ–Ω–Ω—ã–µ —Å –ø–æ–º–æ—â—å—é –ª–æ–≥–∏—á–µ—Å–∫–æ–≥–æ < / h2>

Python –≤–∫–ª—é—á–∞–µ—Ç –≤—Å—Ç—Ä–æ–µ–Ω–Ω—É—é —Ñ—É–Ω–∫—Ü–∏—é —Å –∏–º–µ–Ω–µ–º bool (), –∫–æ—Ç–æ—Ä—É—é –≤—ã –º–æ–∂–µ—Ç–µ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥–ª—è –æ—Ü–µ–Ω–∫–∏ –ø–µ—Ä–µ–º–µ–Ω–Ω–æ–π –∏–ª–∏ –∑–Ω–∞—á–µ–Ω–∏—è. bool () –ø—Ä–∏–Ω–∏–º–∞–µ—Ç –æ–¥–∏–Ω –∞—Ä–≥—É–º–µ–Ω—Ç: –∑–Ω–∞—á–µ–Ω–∏–µ –∏–ª–∏ –ø–µ—Ä–µ–º–µ–Ω–Ω—É—é, –∫–æ—Ç–æ—Ä—É—é –≤—ã —Ö–æ—Ç–∏—Ç–µ –æ—Ü–µ–Ω–∏—Ç—å.

–í–æ—Ç —Å–∏–Ω—Ç–∞–∫—Å–∏—Å –¥–ª—è –º–µ—Ç–æ–¥–∞ bool ():

–ú–µ—Ç–æ–¥ bool () –º–æ–∂–µ—Ç –±—ã—Ç—å –ø–æ–ª–µ–∑–µ–Ω –≤–æ –º–Ω–æ–≥–∏—Ö —Å–ª—É—á–∞—è—Ö.

–í–æ-–ø–µ—Ä–≤—ã—Ö, –µ—Å–ª–∏ –≤—ã —Ö–æ—Ç–∏—Ç–µ –≤—ã–ø–æ–ª–Ω–∏—Ç—å –∫–∞–∫–æ–µ-–ª–∏–±–æ —Å—Ä–∞–≤–Ω–µ–Ω–∏–µ, –≤—ã –º–æ–∂–µ—Ç–µ –∑–∞–∫–ª—é—á–∏—Ç—å –µ–≥–æ –≤ –º–µ—Ç–æ–¥ bool (), –∫–æ—Ç–æ—Ä—ã–π –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç –ª–æ–≥–∏—á–µ—Å–∫–æ–µ –∑–Ω–∞—á–µ–Ω–∏–µ. –ù–∞–ø—Ä–∏–º–µ—Ä, —Å–∫–∞–∂–µ–º, –≤—ã —Ö–æ—Ç–∏—Ç–µ —É–∑–Ω–∞—Ç—å, –∫—É–ø–∏–ª –ª–∏ –∫–ª–∏–µ–Ω—Ç 50 –∏–ª–∏ –±–æ–ª–µ–µ –ø–∏–Ω—Ç –º–æ—Ä–æ–∂–µ–Ω–æ–≥–æ –≤ –≤–∞—à–µ–º –º–∞–≥–∞–∑–∏–Ω–µ. –ï—Å–ª–∏ —ç—Ç–æ —Ç–∞–∫, –≤—ã —Ö–æ—Ç–∏—Ç–µ –æ—Ç–ø—Ä–∞–≤–∏—Ç—å —ç—Ç–æ–º—É –ø–æ–∫—É–ø–∞—Ç–µ–ª—é –æ—Ç–∫—Ä—ã—Ç–∫—É —Å –±–ª–∞–≥–æ–¥–∞—Ä–Ω–æ—Å—Ç—å—é. –í—ã –º–æ–∂–µ—Ç–µ –≤—ã—è—Å–Ω–∏—Ç—å —ç—Ç–æ, –∏—Å–ø–æ–ª—å–∑—É—è —Å–ª–µ–¥—É—é—â–∏–π –∫–æ–¥:

"–ö–∞—Ä—å–µ—Ä–Ω–∞—è –∫–∞—Ä–º–∞ –≤–æ—à–ª–∞ –≤ –º–æ—é –∂–∏–∑–Ω—å, –∫–æ–≥–¥–∞ –ú–Ω–µ —ç—Ç–æ –±—ã–ª–æ –Ω—É–∂–Ω–æ –±–æ–ª—å—à–µ –≤—Å–µ–≥–æ, –∏ —è –±—ã—Å—Ç—Ä–æ –ø–æ–º–æ–≥ –º–Ω–µ –ø—Ä–æ–≤–µ—Å—Ç–∏ –º–∞—Ç—á —Å –±—É—Ç–∫–µ–º–ø–æ–º. –ß–µ—Ä–µ–∑ –¥–≤–∞ –º–µ—Å—è—Ü–∞ –ø–æ—Å–ª–µ –≤—ã–ø—É—Å–∫–∞ —è –Ω–∞—à–ª–∞ —Ä–∞–±–æ—Ç—É —Å–≤–æ–µ–π –º–µ—á—Ç—ã, –∫–æ—Ç–æ—Ä–∞—è —Å–æ–æ—Ç–≤–µ—Ç—Å—Ç–≤–æ–≤–∞–ª–∞ –º–æ–∏–º —Ü–µ–Ω–Ω–æ—Å—Ç—è–º –∏ —Ü–µ–ª—è–º –≤ –∂–∏–∑–Ω–∏! "

–í–µ–Ω–µ—Ä–∞, –∏–Ω–∂–µ–Ω–µ—Ä-–ø—Ä–æ–≥—Ä–∞–º–º–∏—Å—Ç –≤ Rockbot

< p> –†–µ–∑—É–ª—å—Ç–∞—Ç–æ–º –Ω–∞—à–µ–≥–æ –∫–æ–¥–∞ —è–≤–ª—è–µ—Ç—Å—è True. & nbsp;

–ù–∞—à –∫–ª–∏–µ–Ω—Ç –∫—É–ø–∏–ª –±–æ–ª–µ–µ 50 –ø–∏–Ω—Ç –º–æ—Ä–æ–∂–µ–Ω–æ–≥–æ, –ø–æ—ç—Ç–æ–º—É –Ω–∞—à–µ —É—Ç–≤–µ—Ä–∂–¥–µ–Ω–∏–µ –æ—Ü–µ–Ω–∏–≤–∞–µ—Ç—Å—è –∫–∞–∫ True . –°—Ç–æ–∏—Ç –æ—Ç–º–µ—Ç–∏—Ç—å, —á—Ç–æ –≤–∞–º –Ω–µ –Ω—É–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –º–µ—Ç–æ–¥ bool () –¥–ª—è –ø–æ–¥–æ–±–Ω–æ–≥–æ —Å—Ä–∞–≤–Ω–µ–Ω–∏—è. –ù–æ —ç—Ç–æ –º–æ–∂–µ—Ç –±—ã—Ç—å –ø–æ–ª–µ–∑–Ω–æ, –ø–æ—Å–∫–æ–ª—å–∫—É —è—Å–Ω–æ –ø–æ–∫–∞–∑—ã–≤–∞–µ—Ç —Ü–µ–ª—å –≤–∞—à–µ–≥–æ –∫–æ–¥–∞. < / p>

–í–æ-–≤—Ç–æ—Ä—ã—Ö, –µ—Å–ª–∏ –≤—ã —Ö–æ—Ç–∏—Ç–µ –ø—Ä–æ–≤–µ—Ä–∏—Ç—å, —è–≤–ª—è–µ—Ç—Å—è –ª–∏ –∑–Ω–∞—á–µ–Ω–∏–µ –ø—É—Å—Ç—ã–º, None –∏–ª–∏ False, –≤—ã –º–æ–∂–µ—Ç–µ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –º–µ—Ç–æ–¥ bool (). –≠—Ç–æ –Ω–∞–∏–±–æ–ª–µ–µ –ø–æ–ø—É–ª—è—Ä–Ω–æ–µ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞–Ω–∏–µ bool (). –≠—Ç–æ—Ç –º–µ—Ç–æ–¥ –ø—Ä–µ–æ–±—Ä–∞–∑—É–µ—Ç –∑–Ω–∞—á–µ–Ω–∏–µ –≤ –ª–æ–≥–∏—á–µ—Å–∫–æ–µ –∑–Ω–∞—á–µ–Ω–∏–µ –≤ —Å–æ–æ—Ç–≤–µ—Ç—Å—Ç–≤–∏–∏ —Å " —Å—Ç–∞–Ω–¥–∞—Ä—Ç–Ω–æ–π –ø—Ä–æ–≤–µ—Ä–∫–æ–π –∏—Å—Ç–∏–Ω–Ω–æ—Å—Ç–∏ & rdquo ;. –¢–∞–∫–∏–º –æ–±—Ä–∞–∑–æ–º, –≤—ã –º–æ–∂–µ—Ç–µ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å —ç—Ç–æ—Ç –º–µ—Ç–æ–¥, –Ω–∞–ø—Ä–∏–º–µ—Ä, –¥–ª—è –ø—Ä–µ–æ–±—Ä–∞–∑–æ–≤–∞–Ω–∏—è —Ü–µ–ª—ã—Ö —á–∏—Å–µ–ª –∏–ª–∏ —á–∏—Å–µ–ª —Å –ø–ª–∞–≤–∞—é—â–µ–π –∑–∞–ø—è—Ç–æ–π –≤ –ª–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è.

–î–æ–ø—É—Å—Ç–∏–º, —É –Ω–∞—Å –µ—Å—Ç—å —Å–ø–∏—Å–æ–∫ –∑–∞–∫–∞–∑–æ–≤ –º–æ—Ä–æ–∂–µ–Ω–æ–≥–æ –ø–æ—Å—Ç–æ—è–Ω–Ω—ã–º –ø–æ–∫—É–ø–∞—Ç–µ–ª–µ–º. —Ö–æ—Ç–∏—Ç–µ –ø—Ä–æ–≤–µ—Ä–∏—Ç—å, –∑–∞–∫–∞–∑—ã–≤–∞–ª–∏ –ª–∏ –æ–Ω–∏ —Å–æ —Å–≤–æ–µ–π –∫–∞—Ä—Ç–æ–π –ª–æ—è–ª—å–Ω–æ—Å—Ç–∏. –ú—ã –º–æ–≥–ª–∏ –±—ã –≤—ã–ø–æ–ª–Ω–∏—Ç—å —ç—Ç—É –æ—Ü–µ–Ω–∫—É, –∏—Å–ø–æ–ª—å–∑—É—è —Å–ª–µ–¥—É—é—â–∏–µ —Å—Ç—Ä–æ–∫–∏ –∫–æ–¥–∞:

–ù–∞—à –∫–æ–¥ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç False. & nbsp;

–í —ç—Ç–æ–º —Å–ª—É—á–∞–µ –Ω–∞—à –ø–æ—Å—Ç–æ—è–Ω–Ω—ã–π –∫–ª–∏–µ–Ω—Ç –Ω–µ —Ä–∞–∑–º–µ—â–∞–ª –Ω–∏–∫–∞–∫–∏—Ö –∑–∞–∫–∞–∑–æ–≤ —Å –ø–æ–º–æ—â—å—é —Å–≤–æ–µ–π –∫–∞—Ä—Ç—ã, –ø–æ—ç—Ç–æ–º—É –Ω–∞—à –º–µ—Ç–æ–¥ bool () –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç False.

–õ–æ–≥–∏—á–µ—Å–∫–æ–µ —É–ø—Ä–∞–≤–ª–µ–Ω–∏–µ –ø–æ—Ç–æ–∫–æ–º

–õ–æ–≥–∏—á–µ—Å–∫–æ–µ –∑–Ω–∞—á–µ–Ω–∏–µ —è–≤–ª—è–µ—Ç—Å—è –≤–∞–∂–Ω–æ–π —á–∞—Å—Ç—å—é —É–ø—Ä–∞–≤–ª–µ–Ω–∏—è –ø–æ—Ç–æ–∫–æ–º –≤ –ø—Ä–æ–≥—Ä–∞–º–º–∏—Ä–æ–≤–∞–Ω–∏–µ. –≠—Ç–æ –ø–æ—Ç–æ–º—É, —á—Ç–æ –ª–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è –æ—Ü–µ–Ω–∏–≤–∞—é—Ç, —è–≤–ª—è–µ—Ç—Å—è –ª–∏ —É—Å–ª–æ–≤–∏–µ –∏—Å—Ç–∏–Ω–Ω—ã–º –∏–ª–∏ –ª–æ–∂–Ω—ã–º. –ò —ç—Ç—É –∏–Ω—Ñ–æ—Ä–º–∞—Ü–∏—é –º–æ–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å, —á—Ç–æ–±—ã –æ–ø—Ä–µ–¥–µ–ª–∏—Ç—å, —Å–ª–µ–¥—É–µ—Ç –ª–∏ –∑–∞–ø—É—Å–∫–∞—Ç—å –∫–æ–Ω–∫—Ä–µ—Ç–Ω—ã–π –±–ª–æ–∫ –∫–æ–¥–∞.

–í Python —É—Å–ª–æ–≤–Ω—ã–µ –æ–ø–µ—Ä–∞—Ç–æ—Ä—ã –≤ —Å—Ç—Ä–æ–∫–µ –∑–∞–≥–æ–ª–æ–≤–∫–∞, —Ç–∞–∫–∏–µ –∫–∞–∫ –æ–ø–µ—Ä–∞—Ç–æ—Ä—ã if, –∑–∞–ø—É—Å–∫–∞—é—Ç –∫–æ–¥, –µ—Å–ª–∏ –≤—ã–ø–æ–ª–Ω—è–µ—Ç—Å—è –æ–ø—Ä–µ–¥–µ–ª–µ–Ω–Ω–æ–µ —É—Å–ª–æ–≤–∏–µ –∏–ª–∏ –Ω–∞–±–æ—Ä —É—Å–ª–æ–≤–∏–π. –≠—Ç–∏ –æ–ø–µ—Ä–∞—Ç–æ—Ä—ã —Ä–∞–±–æ—Ç–∞—é—Ç —Ç–æ–ª—å–∫–æ –ø–æ—Ç–æ–º—É, —á—Ç–æ –ª–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è –æ—Ü–µ–Ω–∏–≤–∞—é—Ç —É—Å–ª–æ–≤–∏–µ, —É–∫–∞–∑–∞–Ω–Ω–æ–µ –≤ –æ–ø–µ—Ä–∞—Ç–æ—Ä–µ.

–î–∞–≤–∞–π—Ç–µ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –ø—Ä–∏–º–µ—Ä, —á—Ç–æ–±—ã –ø—Ä–æ–∏–ª–ª—é—Å—Ç—Ä–∏—Ä–æ–≤–∞—Ç—å, –∫–∞–∫ —ç—Ç–æ —Ä–∞–±–æ—Ç–∞–µ—Ç. –î–æ–ø—É—Å—Ç–∏–º, –º—ã —Å–æ–∑–¥–∞–µ–º –ø—Ä–æ–≥—Ä–∞–º–º—É, –∫–æ—Ç–æ—Ä–∞—è –ø—Ä–∏–Ω–∏–º–∞–µ—Ç –∞–¥—Ä–µ—Å —ç–ª–µ–∫—Ç—Ä–æ–Ω–Ω–æ–π –ø–æ—á—Ç—ã –∫–ª–∏–µ–Ω—Ç–∞ –∏ –ø—Ä–æ–≤–µ—Ä—è–µ—Ç, –ø–æ–¥–ø–∏—Å–∞–Ω—ã –Ω–∞ –Ω–∞—à—É –ø—Ä–æ–≥—Ä–∞–º–º—É –≤–æ–∑–Ω–∞–≥—Ä–∞–∂–¥–µ–Ω–∏–π. –ï—Å–ª–∏ –∫–ª–∏–µ–Ω—Ç –∑–∞—Ä–µ–≥–∏—Å—Ç—Ä–∏—Ä–æ–≤–∞–Ω, –º—ã —Ö–æ—Ç–∏–º –≤—ã–≤–µ—Å—Ç–∏ –Ω–∞ –∫–æ–Ω—Å–æ–ª—å —Å–æ–æ–±—â–µ–Ω–∏–µ, –≤ –∫–æ—Ç–æ—Ä–æ–º –≥–æ–≤–æ—Ä–∏—Ç—Å—è: –≠—Ç–æ—Ç –∫–ª–∏–µ–Ω—Ç —è–≤–ª—è–µ—Ç—Å—è –ø–æ—Å—Ç–æ—è–Ω–Ω—ã–º –∫–ª–∏–µ–Ω—Ç–æ–º! –í –ø—Ä–æ—Ç–∏–≤–Ω–æ–º —Å–ª—É—á–∞–µ –º—ã —Ö–æ—Ç–∏–º –Ω–∞–ø–µ—á–∞—Ç–∞—Ç—å –ù–µ—Ç –∑–∞–ø–∏—Å—å.

–î–ª—è —ç—Ç–æ–≥–æ –º—ã –º–æ–≥–ª–∏ –±—ã –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å —Å–ª–µ–¥—É—é—â–∏–µ —Å—Ç—Ä–æ–∫–∏ –∫–æ–¥–∞:

–ù–∞—à –∫–æ–¥ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç True.

–í –Ω–∞—à–µ–π –ø—Ä–æ–≥—Ä–∞–º–º–µ –Ω–∞—à –í—ã—Ä–∞–∂–µ–Ω–∏–µ if (–≤ —Å—Ç—Ä–æ–∫–µ –∑–∞–≥–æ–ª–æ–≤–∫–∞) –ø—Ä–æ–≤–µ—Ä—è–µ—Ç, —Ä–∞–≤–Ω–∞ –ª–∏ –ø–µ—Ä–µ–º–µ–Ω–Ω–∞—è loyalty_customer True. –ï—Å–ª–∏ loyalty_customer —Ä–∞–≤–µ–Ω True, –≤—ã—Ä–∞–∂–µ–Ω–∏–µ if –±—É–¥–µ—Ç –æ—Ü–µ–Ω–∏–≤–∞—Ç—å—Å—è –∫–∞–∫ True. –¢–∞–∫–∏–º –æ–±—Ä–∞–∑–æ–º, —Å–æ–æ–±—â–µ–Ω–∏–µ –≠—Ç–æ—Ç –∫–ª–∏–µ–Ω—Ç —è–≤–ª—è–µ—Ç—Å—è –ø–æ—Å—Ç–æ—è–Ω–Ω—ã–º –∫–ª–∏–µ–Ω—Ç–æ–º! –≤ —Å–ª–µ–¥—É—é—â–µ–π —Å—Ç—Ä–æ–∫–µ –±—É–¥–µ—Ç –≤—ã–≤–µ–¥–µ–Ω–æ –Ω–∞ –∫–æ–Ω—Å–æ–ª—å. –ï—Å–ª–∏ loyalty_customer —Ä–∞–≤–µ–Ω False, —Ç–æ–≥–¥–∞ –≤—ã—Ä–∞–∂–µ–Ω–∏–µ if –±—É–¥–µ—Ç –æ—Ü–µ–Ω–∏–≤–∞—Ç—å—Å—è –∫–∞–∫ False. –í —ç—Ç–æ–º —Å–ª—É—á–∞–µ –Ω–∞—à–∞ –ø—Ä–æ–≥—Ä–∞–º–º–∞ –Ω–∞–ø–µ—á–∞—Ç–∞–µ—Ç –ù–µ—Ç –∑–∞–ø–∏—Å–∏.

–õ–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è –ø–æ–∑–≤–æ–ª—è—é—Ç –Ω–∞–º –æ—Ü–µ–Ω–∏–≤–∞—Ç—å –æ–ø–µ—Ä–∞—Ç–æ—Ä—ã –∏ –º–æ–≥—É—Ç –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å—Å—è —Å —É—Å–ª–æ–≤–Ω—ã–º–∏ –æ–ø–µ—Ä–∞—Ç–æ—Ä–∞–º–∏ –¥–ª—è –ø—Ä–æ–≤–µ—Ä–∫–∏ —Ç–æ–≥–æ, —è–≤–ª—è–µ—Ç—Å—è –ª–∏ –æ–ø—Ä–µ–¥–µ–ª–µ–Ω–Ω—ã–π –æ–ø–µ—Ä–∞—Ç–æ—Ä True –∏–ª–∏ False.

–ó–∞–∫–ª—é—á–µ–Ω–∏–µ

–õ–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è - –≤–∞–∂–Ω—ã–π —Ç–∏–ø –¥–∞–Ω–Ω—ã—Ö –≤ –ø—Ä–æ–≥—Ä–∞–º–º–∏—Ä–æ–≤–∞–Ω–∏–∏, –∫–æ—Ç–æ—Ä—ã–π –º–æ–∂–µ—Ç —É–∫–∞–∑—ã–≤–∞—Ç—å, —è–≤–ª—è–µ—Ç—Å—è –ª–∏ –∑–Ω–∞—á–µ–Ω–∏–µ True –∏–ª–∏ False.

–õ–æ–≥–∏—á–µ—Å–∫–∏–µ –∑–Ω–∞—á–µ–Ω–∏—è —á–∞—Å—Ç–æ –∏—Å–ø–æ–ª—å–∑—É—é—Ç—Å—è –¥–ª—è –æ—Ü–µ–Ω–∫–∏ –æ–ø–µ—Ä–∞—Ç–æ—Ä–æ–≤ —Å –ø–æ–º–æ—â—å—é –æ–ø–µ—Ä–∞—Ç–æ—Ä–æ–≤ —Å—Ä–∞–≤–Ω–µ–Ω–∏—è, –∞ —Ç–∞–∫–∂–µ –º–æ–≥—É—Ç –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å—Å—è –¥–ª—è —É–ø—Ä–∞–≤–ª–µ–Ω–∏—è –ø–æ—Ç–æ–∫–æ–º –ø—Ä–æ–≥—Ä–∞–º–º—ã. –ö—Ä–æ–º–µ —Ç–æ–≥–æ, –≤ Python –µ—Å—Ç—å –≤—Å—Ç—Ä–æ–µ–Ω–Ω—ã–π –º–µ—Ç–æ–¥ bool () –¥–ª—è –ø—Ä–æ–≤–µ—Ä–∫–∏ —Ç–æ–≥–æ, —è–≤–ª—è–µ—Ç—Å—è –ª–∏ —ç–ª–µ–º–µ–Ω—Ç –ø—É—Å—Ç—ã–º –∏–ª–∏ —Ä–∞–≤–µ–Ω None –∏–ª–∏ False.

–í —ç—Ç–æ–º —Ä—É–∫–æ–≤–æ–¥—Å—Ç–≤–µ –∏—Å—Å–ª–µ–¥–æ–≤–∞–ª–∏—Å—å –æ–ø–µ—Ä–∞—Ç–æ—Ä—ã —Å—Ä–∞–≤–Ω–µ–Ω–∏—è —Å –ª–æ–≥–∏—á–µ—Å–∫–∏–º–∏ –∑–Ω–∞—á–µ–Ω–∏—è–º–∏, —É–ø—Ä–∞–≤–ª–µ–Ω–∏–µ –ø–æ—Ç–æ–∫–æ–º —Å –ø–æ–º–æ—â—å—é –ª–æ–≥–∏—á–µ—Å–∫–∏—Ö –∑–Ω–∞—á–µ–Ω–∏–π –∏ –º–µ—Ç–æ–¥–∞ Python bool (). –¢–µ–ø–µ—Ä—å –≤—ã –≤–æ–æ—Ä—É–∂–µ–Ω—ã –∑–Ω–∞–Ω–∏—è–º–∏, –Ω–µ–æ–±—Ö–æ–¥–∏–º—ã–º–∏ –¥–ª—è —Ä–∞–±–æ—Ç—ã —Å –ª–æ–≥–∏—á–µ—Å–∫–∏–º–∏ –∑–Ω–∞—á–µ–Ω–∏—è–º–∏ –≤ Python, –∫–∞–∫ —ç–∫—Å–ø–µ—Ä—Ç!

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers


Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method