Итерации по словарю Python: пошаговое руководство

–ú–µ—Ç–æ–¥ items (), –º–µ—Ç–æ–¥ keys () –∏ –º–µ—Ç–æ–¥ values ‚Äã‚Äã() –≤–æ–∑–≤—Ä–∞—â–∞—é—Ç –∑–Ω–∞—á–µ–Ω–∏—è, –∫–æ—Ç–æ—Ä—ã–µ –º–æ–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥–ª—è –∏—Ç–µ—Ä–∞—Ü–∏–∏ –ø–æ —Å–ª–æ–≤–∞—Ä—é –≤ Python. items () –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç –∫–∞–∫ –∫–ª—é—á–∏, —Ç–∞–∫ –∏ –∑–Ω–∞—á–µ–Ω–∏—è –≤ —Å–ª–æ–≤–∞—Ä–µ Python. keys () –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç –∫–ª—é—á–∏ –≤ —Å–ª–æ–≤–∞—Ä–µ. values ‚Äã‚Äã() –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç –∑–Ω–∞—á–µ–Ω–∏—è –≤ —Å–ª–æ–≤–∞—Ä–µ. –í—ã —Ç–∞–∫–∂–µ –º–æ–∂–µ—Ç–µ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å —Ü–∏–∫–ª for –¥–ª—è –ø–µ—Ä–µ–±–æ—Ä–∞ —Å–ª–æ–≤–∞—Ä—è Python.

–ö–æ–≥–¥–∞ –≤—ã —Ä–∞–±–æ—Ç–∞–µ—Ç–µ —Å d ictionaries, –≤—ã –º–æ–∂–µ—Ç–µ –ø–µ—Ä–µ–±–∏—Ä–∞—Ç—å —Å–æ—Ö—Ä–∞–Ω–µ–Ω–Ω—ã–µ –∑–Ω–∞—á–µ–Ω–∏—è.

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

–ï—Å—Ç—å –Ω–µ—Å–∫–æ–ª—å–∫–æ —Å–ø–æ—Å–æ–±–æ–≤ –ø–µ—Ä–µ–±–æ—Ä–∞ —Å–ª–æ–≤–∞—Ä—è. –í —ç—Ç–æ–º —Ä—É–∫–æ–≤–æ–¥—Å—Ç–≤–µ –±—É–¥–µ—Ç –æ–±—Å—É–∂–¥–∞—Ç—å—Å—è, –∫–∞–∫ –≤—ã–ø–æ–ª–Ω—è—Ç—å –∏—Ç–µ—Ä–∞—Ü–∏—é –ø–æ —Å–ª–æ–≤–∞—Ä—é —Å –ø–æ–º–æ—â—å—é —Ü–∏–∫–ª–∞ for, items () –∏ keys (). –ú—ã —Ç–∞–∫–∂–µ —Ä–∞—Å—Å–º–æ—Ç—Ä–∏–º –ø—Ä–∏–º–µ—Ä –∫–∞–∂–¥–æ–≥–æ –∏–∑ —ç—Ç–∏—Ö –ø–æ–¥—Ö–æ–¥–æ–≤, –∏—Å–ø–æ–ª—å–∑—É–µ–º—ã—Ö –¥–ª—è –ø–µ—Ä–µ–±–æ—Ä–∞ —Å–ª–æ–≤–∞—Ä—è.

Dictionary Refresher

–°–ª–æ–≤–∞—Ä–∏ Python —Ö—Ä–∞–Ω–∏—Ç—å –¥–∞–Ω–Ω—ã–µ –≤ —Å—Ç—Ä—É–∫—Ç—É—Ä–µ "–∫–ª—é—á-–∑–Ω–∞—á–µ–Ω–∏–µ". –≠—Ç–æ –æ–∑–Ω–∞—á–∞–µ—Ç, —á—Ç–æ –∫–∞–∂–¥–æ–º—É –∑–Ω–∞—á–µ–Ω–∏—é –Ω–∞–∑–Ω–∞—á–∞–µ—Ç—Å—è –∫–ª—é—á, –∫–æ—Ç–æ—Ä—ã–π –º–æ–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥–ª—è —Å—Å—ã–ª–∫–∏ –Ω–∞ —ç—Ç–æ –∫–æ–Ω–∫—Ä–µ—Ç–Ω–æ–µ –∑–Ω–∞—á–µ–Ω–∏–µ.

–í–æ—Ç –ø—Ä–∏–º–µ—Ä —Å–ª–æ–≤–∞—Ä—è –≤ Python:

–í –Ω–∞—à–µ–º —Å–ª–æ–≤–∞—Ä–µ –ø–æ–≤—Å—é–¥—É –∏—Å–ø–æ–ª—å–∑—É—é—Ç—Å—è –¥–≤–æ–µ—Ç–æ—á–∏—è (:), –∫–æ—Ç–æ—Ä—ã–µ —Ä–∞–∑–¥–µ–ª—è—é—Ç –Ω–∞—à–∏ –∫–ª—é—á–∏ –∏ –∑–Ω–∞—á–µ–Ω–∏—è. . –°–ª–æ–≤–∞ —Å–ª–µ–≤–∞ –æ—Ç –¥–≤–æ–µ—Ç–æ—á–∏—è —è–≤–ª—è—é—Ç—Å—è –∫–ª—é—á–∞–º–∏, –≤ –¥–∞–Ω–Ω–æ–º —Å–ª—É—á–∞–µ —ç—Ç–æ title, author, date_published –∏ in_stock. –í—Å–µ —ç—Ç–∏ –∫–ª—é—á–∏ –æ—Ç—Ñ–æ—Ä–º–∞—Ç–∏—Ä–æ–≤–∞–Ω—ã –∫–∞–∫ —Å—Ç—Ä–æ–∫–∏.

Python Iterate Through Dictionary

–í—ã –º–æ–∂–µ—Ç–µ –≤—ã–ø–æ–ª–Ω—è—Ç—å –∏—Ç–µ—Ä–∞—Ü–∏—é –ø–æ —Å–ª–æ–≤–∞—Ä—é Python, –∏—Å–ø–æ–ª—å–∑—É—è –º–µ—Ç–æ–¥—ã keys (), items () –∏ values ‚Äã‚Äã(). keys () –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç –ø–æ–≤—Ç–æ—Ä—è—é—â–∏–π—Å—è —Å–ø–∏—Å–æ–∫ –∫–ª—é—á–µ–π —Å–ª–æ–≤–∞—Ä—è. items () –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç –ø–∞—Ä—ã –∫–ª—é—á-–∑–Ω–∞—á–µ–Ω–∏–µ –≤ —Å–ª–æ–≤–∞—Ä–µ. values ‚Äã‚Äã() –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç –∑–Ω–∞—á–µ–Ω–∏—è —Å–ª–æ–≤–∞—Ä—è. –í—ã —Ç–∞–∫–∂–µ –º–æ–∂–µ—Ç–µ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å —Ü–∏–∫–ª for –¥–ª—è –∏—Ç–µ—Ä–∞—Ü–∏–∏ –ø–æ —Å–ª–æ–≤–∞—Ä—é.

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

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

–°—ç–π —Ö–æ—Ç–µ–ª –∑–Ω–∞—Ç—å, —Å–∫–æ–ª—å–∫–æ –∫–Ω–∏–≥–∏ –≤ –≤–∞—à–µ–π –±–∏–±–ª–∏–æ—Ç–µ–∫–µ. –í–æ–∑–º–æ–∂–Ω–æ, –≤—ã –∑–∞—Ö–æ—Ç–∏—Ç–µ –ø–µ—Ä–µ–±—Ä–∞—Ç—å –∫–∞–∂–¥—ã–π —Å–ª–æ–≤–∞—Ä—å, —á—Ç–æ–±—ã –≤—ã—á–∏—Å–ª–∏—Ç—å –æ–±—â–µ–µ –∫–æ–ª–∏—á–µ—Å—Ç–≤–æ –∫–∞–∂–¥–æ–π –∫–Ω–∏–≥–∏.

–ò—Ç–µ—Ä–∞—Ü–∏—è —Å –∏—Å–ø–æ–ª—å–∑–æ–≤–∞–Ω–∏–µ–º —Ü–∏–∫–ª–∞ –¥–ª—è —Ü–∏–∫–ª–∞

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

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

–ù–∞—à –∫–æ–¥ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç —Å–ª–µ–¥—É—é—â–µ–µ:

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

–ó–∞—Ç–µ–º –º—ã –æ–±—ä—è–≤–ª—è–µ–º —Ü–∏–∫–ª for, –∫–æ—Ç–æ—Ä—ã–π –≤—ã–ø–æ–ª–Ω—è–µ—Ç –∏—Ç–µ—Ä–∞—Ü–∏—é –ø–æ –∫–∞–∂–¥–æ–º—É –∑–Ω–∞—á–µ–Ω–∏—é –≤ –Ω–∞—à–µ–º —Å–ª–æ–≤–∞—Ä–µ. –¶–∏–∫–ª for –≤—ã–≤–æ–¥–∏—Ç –Ω–∞ –∫–æ–Ω—Å–æ–ª—å –∫–ª—é—á –∏ –∑–Ω–∞—á–µ–Ω–∏–µ, —Å–≤—è–∑–∞–Ω–Ω—ã–µ —Å —ç—Ç–∏–º –∫–ª—é—á–æ–º.

–ò—Ç–µ—Ä–∞—Ü–∏—è —Å –∏—Å–ø–æ–ª—å–∑–æ–≤–∞–Ω–∏–µ–º items ()

dictionary.items () –ø—Ä–µ–æ–±—Ä–∞–∑—É–µ—Ç –∫–∞–∂–¥—É—é –ø–∞—Ä—É "–∫–ª—é—á-–∑–Ω–∞—á–µ–Ω–∏–µ" –≤ —Å–ª–æ–≤–∞—Ä–µ –≤ –∫–æ—Ä—Ç–µ–∂. –ò—Å–ø–æ–ª—å–∑—É—è —Ü–∏–∫–ª for –∏ –º–µ—Ç–æ–¥ items (), –≤—ã –º–æ–∂–µ—Ç–µ –ø–µ—Ä–µ–±–∏—Ä–∞—Ç—å –≤—Å–µ –∫–ª—é—á–∏ –∏ –∑–Ω–∞—á–µ–Ω–∏—è –≤ —Å–ø–∏—Å–∫–µ.

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

–ù–∞—à –∫–æ–¥ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç —Å–ø–∏—Å–æ–∫ –∫–æ—Ä—Ç–µ–∂–µ–π:

–ú—ã –æ–ø—Ä–µ–¥–µ–ª—è–µ–º for, –∫–æ—Ç–æ—Ä—ã–π –ø–µ—Ä–µ–±–∏—Ä–∞–µ—Ç –Ω–∞—à —Å–ª–æ–≤–∞—Ä—å book —Å –ø–æ–º–æ—â—å—é items (). items () –ø—Ä–µ–æ–±—Ä–∞–∑—É–µ—Ç –∫–∞–∂–¥—É—é –ø–∞—Ä—É "–∫–ª—é—á-–∑–Ω–∞—á–µ–Ω–∏–µ" –≤ –∫–æ—Ä—Ç–µ–∂, –∫ –∫–æ—Ç–æ—Ä–æ–º—É –º—ã –∑–∞—Ç–µ–º –º–æ–∂–µ–º –ø–æ–ª—É—á–∏—Ç—å –¥–æ—Å—Ç—É–ø –≤ –Ω–∞—à–µ–º —Ü–∏–∫–ª–µ for. –ö–∞–∫ –≤–∏–¥–∏—Ç–µ, –∫–∞–∂–¥–∞—è –ø–∞—Ä–∞ "–∫–ª—é—á-–∑–Ω–∞—á–µ–Ω–∏–µ" –±—ã–ª–∞ –≤—ã–≤–µ–¥–µ–Ω–∞ –Ω–∞ –∫–æ–Ω—Å–æ–ª—å –∫–∞–∫ –∫–æ—Ä—Ç–µ–∂.

–≠—Ç–æ—Ç –ø–æ–¥—Ö–æ–¥ –º–æ–∂–µ—Ç –±—ã—Ç—å –ø–æ–ª–µ–∑–µ–Ω, –µ—Å–ª–∏ –≤—ã —Ö–æ—Ç–∏—Ç–µ –ø—Ä–µ–æ–±—Ä–∞–∑–æ–≤–∞—Ç—å –∫–∞–∂–¥–æ–µ –∑–Ω–∞—á–µ–Ω–∏–µ –≤ –≤–∞—à–µ–º —Å–ª–æ–≤–∞—Ä–µ –≤ –∫–æ—Ä—Ç–µ–∂ –≤–æ –≤—Ä–µ–º—è –∏—Ç–µ—Ä–∞—Ü–∏–∏.

–ò—Ç–µ—Ä–∞—Ü–∏—è —Å –∏—Å–ø–æ–ª—å–∑–æ–≤–∞–Ω–∏–µ–º –∫–ª—é—á–µ–π ()

–ß–∞—Å—Ç–æ –≤–∞–º –º–æ–∂–µ—Ç –ø–æ—Ç—Ä–µ–±–æ–≤–∞—Ç—å—Å—è —Ç–æ–ª—å–∫–æ –∏—Ç–µ—Ä–∞—Ü–∏—è –ø–æ –∫–ª—é—á–∞–º —Å–ª–æ–≤–∞—Ä—è.

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

–ú—ã –º–æ–≥–ª–∏ –±—ã –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –º–µ—Ç–æ–¥ Python Dictionary keys () , —á—Ç–æ–±—ã –ø–æ–ª—É—á–∏—Ç—å —Å–ø–∏—Å–æ–∫ –∫–ª—é—á–µ–π –∏ —Ä–∞—Å–ø–µ—á–∞—Ç–∞—Ç—å –∏—Ö –Ω–∞ –∫–æ–Ω—Å–æ–ª–∏. –í–æ—Ç –∫–æ–¥, –∫–æ—Ç–æ—Ä—ã–π –º—ã –±—É–¥–µ–º –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥–ª—è –≤—ã–ø–æ–ª–Ω–µ–Ω–∏—è —ç—Ç–æ–π –∑–∞–¥–∞—á–∏:

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

–í –Ω–∞—à–µ–º –∫–æ–¥–µ –º—ã –æ–ø—Ä–µ–¥–µ–ª—è–µ–º —Ü–∏–∫–ª for, –∫–æ—Ç–æ—Ä—ã–π –∏—Å–ø–æ–ª—å–∑—É–µ—Ç keys (), —á—Ç–æ–±—ã –Ω–∞–π—Ç–∏ –∫–ª—é—á–∏ –≤ –Ω–∞—à–µ–º —Å–ª–æ–≤–∞—Ä–µ. –ó–∞—Ç–µ–º —Ü–∏–∫–ª –ø–µ—Ä–µ–±–∏—Ä–∞–µ—Ç –∫–∞–∂–¥—ã–π –∏–∑ —ç—Ç–∏—Ö –∫–ª—é—á–µ–π –∏ –≤—ã–≤–æ–¥–∏—Ç –∏—Ö –Ω–∞ –∫–æ–Ω—Å–æ–ª—å. –ö–∞–∫ –≤–∏–¥–∏—Ç–µ, –Ω–∞—à –∫–æ–¥ –≤–µ—Ä–Ω—É–ª –∏–º–µ–Ω–∞ –Ω–∞—à–∏—Ö —á–µ—Ç—ã—Ä–µ—Ö –∫–ª—é—á–µ–π.

–ò—Ç–µ—Ä–∞—Ü–∏—è —Å –∏—Å–ø–æ–ª—å–∑–æ–≤–∞–Ω–∏–µ–º –∑–Ω–∞—á–µ–Ω–∏–π ()

Python Dictionary values ‚Äã‚Äã() –º–µ—Ç–æ–¥ –º–æ–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥–ª—è –ø–µ—Ä–µ–±–æ—Ä–∞ –∑–Ω–∞—á–µ–Ω–∏–π —Å–ª–æ–≤–∞—Ä—è –≤ Python. –≠—Ç–æ—Ç –º–µ—Ç–æ–¥ —Ä–∞–±–æ—Ç–∞–µ—Ç —Ç–∞–∫ –∂–µ, –∫–∞–∫ keys (), –Ω–æ –≤–º–µ—Å—Ç–æ —ç—Ç–æ–≥–æ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç –∑–Ω–∞—á–µ–Ω–∏—è –≤ —Å–ª–æ–≤–∞—Ä–µ.

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

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

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

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

–ü—Ä–æ—Å–º–æ—Ç—Ä–∏—Ç–µ Repl.it —Å —ç—Ç–æ–≥–æ —Ä—É–∫–æ–≤–æ–¥—Å—Ç–≤–æ:



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

–î–ª—è –ø–æ–≤—Ç–æ—Ä–µ–Ω–∏—è —Å –ø–æ–º–æ—â—å—é —Å–ª–æ–≤–∞—Ä—è –≤ Python –º–æ–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å —á–µ—Ç—ã—Ä–µ –æ—Å–Ω–æ–≤–Ω—ã—Ö –ø–æ–¥—Ö–æ–¥–∞: —Å–æ–∑–¥–∞—Ç—å —Ü–∏–∫–ª for, –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å items () –¥–ª—è –∏—Ç–µ—Ä–∞—Ü–∏–∏ –ø–æ –ø–∞—Ä–∞–º "–∫–ª—é—á-–∑–Ω–∞—á–µ–Ω–∏–µ" —Å–ª–æ–≤–∞—Ä—è, us e keys () –¥–ª—è –ø–µ—Ä–µ–±–æ—Ä–∞ –∫–ª—é—á–µ–π —Å–ª–æ–≤–∞—Ä—è –∏–ª–∏ –∏—Å–ø–æ–ª—å–∑—É–π—Ç–µ values ‚Äã‚Äã() –¥–ª—è –ø–µ—Ä–µ–±–æ—Ä–∞ –∑–Ω–∞—á–µ–Ω–∏–π —Å–ª–æ–≤–∞—Ä—è.

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

–î–ª—è –ø–æ–ª—É—á–µ–Ω–∏—è –∏–Ω—Ñ–æ—Ä–º–∞—Ü–∏–∏ –æ –ª—É—á—à–∏—Ö –∫—É—Ä—Å–∞—Ö Python, —É—á–µ–±–Ω—ã—Ö –ø—Ä–æ–≥—Ä–∞–º–º–∞—Ö –∏ —É—á–µ–±–Ω—ã—Ö —Ä–µ—Å—É—Ä—Å–∞—Ö –æ–∑–Ω–∞–∫–æ–º—å—Ç–µ—Å—å —Å –Ω–∞—à–∏–º –ö–∞–∫ –≤ —Ä—É–∫–æ–≤–æ–¥—Å—Ç–≤–æ –ø–æ –∏–∑—É—á–µ–Ω–∏—é 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

News


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