Методы списка Python: пошаговое руководство

–°–ø–∏—Å–∫–∏ - —ç—Ç–æ –≤—Å—Ç—Ä–æ–µ–Ω–Ω–∞—è —Å—Ç—Ä—É–∫—Ç—É—Ä–∞ –¥–∞–Ω–Ω—ã—Ö –≤ Python 3. –°–ø–∏—Å–∫–∏ Python –º–æ–≥—É—Ç –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å—Å—è –¥–ª—è —É–ø–æ—Ä—è–¥–æ—á–µ–Ω–Ω–æ–≥–æ —É–ø–æ—Ä—è–¥–æ—á–∏–≤–∞–Ω–∏—è –∏ —Ö—Ä–∞–Ω–µ–Ω–∏—è –¥–∞–Ω–Ω—ã—Ö, —Ç–∞–∫–∏—Ö –∫–∞–∫ –∏–º–µ–Ω–∞ –ø–æ—Å—Ç–∞–≤—â–∏–∫–æ–≤ –¥–ª—è –ø—Ä–æ–∏–∑–≤–æ–¥—Å—Ç–≤–µ–Ω–Ω–æ–π –∫–æ–º–ø–∞–Ω–∏–∏, –∏–Ω—Ñ–æ—Ä–º–∞—Ü–∏—è –æ –∑–∞—Ä–ø–ª–∞—Ç–µ –¥–ª—è –∫–æ–º–ø–∞–Ω–∏–∏. —Å–æ—Ç—Ä—É–¥–Ω–∏–∫–æ–≤, —Å–ø–∏—Å–æ–∫ –æ—Ü–µ–Ω–æ–∫ —É—á–∞—â–∏—Ö—Å—è –∏–ª–∏ —á—Ç–æ-—Ç–æ –µ—â–µ.

–í Python –µ—Å—Ç—å —Ä—è–¥ –≤—Å—Ç—Ä–æ–µ–Ω–Ω—ã—Ö —Ñ—É–Ω–∫—Ü–∏–π, –∫–æ—Ç–æ—Ä—ã–µ –º—ã –º–æ–∂–µ–º –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥–ª—è –∏–∑–º–µ–Ω–µ–Ω–∏—è –∏–ª–∏ —É–ø—Ä–∞–≤–ª–µ–Ω–∏—è –¥–∞–Ω–Ω—ã–º–∏, —Ö—Ä–∞–Ω—è—â–∏–º–∏—Å—è –≤ —Å–ø–∏—Å–∫–∞—Ö. < / p>

–í —ç—Ç–æ–º —Ä—É–∫–æ–≤–æ–¥—Å—Ç–≤–µ –º—ã —Ä–∞–∑–±–µ—Ä–µ–º –Ω–µ–∫–æ—Ç–æ—Ä—ã–µ –∏–∑ –Ω–∞–∏–±–æ–ª–µ–µ –ø–æ–ª–µ–∑–Ω—ã—Ö –≤—Å—Ç—Ä–æ–µ–Ω–Ω—ã—Ö –º–µ—Ç–æ–¥–æ–≤, –∫–æ—Ç–æ—Ä—ã–µ –º–æ–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥–ª—è —Ä–∞–±–æ—Ç—ã —Å–æ —Å–ø–∏—Å–∫–∞–º–∏. –ú—ã " —É–∑–Ω–∞–µ–º, –∫–∞–∫ –¥–æ–±–∞–≤–ª—è—Ç—å –∏ —É–¥–∞–ª—è—Ç—å —ç–ª–µ–º–µ–Ω—Ç—ã –∏–∑ —Å–ø–∏—Å–∫–∞, –ø–æ–¥—Å—á–∏—Ç—ã–≤–∞—Ç—å —ç–ª–µ–º–µ–Ω—Ç—ã –≤ —Å–ø–∏—Å–∫–µ, –ø–µ—Ä–µ–≤–µ—Ä–Ω—É—Ç—å —Å–ø–∏—Å–æ–∫ –∏ —Ç. –î.

List Refresher

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

–ö–∞–∂–¥—ã–π —ç–ª–µ–º–µ–Ω—Ç –≤ —Å–ø–∏—Å–∫–µ –Ω–∞–∑—ã–≤–∞–µ—Ç—Å—è item, –∞ —Å–ø–∏—Å–∫–∏ –æ–ø—Ä–µ–¥–µ–ª—è—é—Ç—Å—è –∑–∞–∫–ª—é—á–µ–Ω–Ω—ã–º–∏ –≤ –Ω–µ–≥–æ –∑–Ω–∞—á–µ–Ω–∏—è–º–∏, —Ä–∞–∑–¥–µ–ª–µ–Ω–Ω—ã–º–∏ –∑–∞–ø—è—Ç—ã–º–∏. –≤ –∫–≤–∞–¥—Ä–∞—Ç–Ω—ã—Ö —Å–∫–æ–±–∫–∞—Ö ([]).

–í–æ—Ç –∫–∞–∫ —Å–æ–∑–¥–∞—Ç—å —Å–ø–∏—Å–æ–∫ –≤ Python:

–ß—Ç–æ–±—ã —Ä–∞—Å–ø–µ—á–∞—Ç–∞—Ç—å –Ω–∞—à–∏ list –º—ã –º–æ–∂–µ–º –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å —Ñ—É–Ω–∫—Ü–∏—é print ():

–ù–∞—à–∞ –ø—Ä–æ–≥—Ä–∞–º–º–∞ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç –Ω–∞—à –∏—Å—Ö–æ–¥–Ω—ã–π –º–∞—Å—Å–∏–≤ –≤ —Ç–æ–º –≤–∏–¥–µ, –≤ –∫–∞–∫–æ–º –º—ã –µ–≥–æ –æ–ø—Ä–µ–¥–µ–ª–∏–ª–∏:

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

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

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

< td> Washington Post
New York Times CNN BuzzFeed
1 2 3

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

–ù–∞—à –∫–æ–¥ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç: New York Times. –¢–æ—á–Ω–æ —Ç–∞–∫ –∂–µ, –µ—Å–ª–∏ –º—ã —Å—Å—ã–ª–∞–µ–º—Å—è –Ω–∞ —ç–ª–µ–º–µ–Ω—Ç —Å–ø–∏—Å–∫–∞ —Å–æ –∑–Ω–∞—á–µ–Ω–∏–µ–º –∏–Ω–¥–µ–∫—Å–∞ 2, –Ω–∞—à –∫–æ–¥ –≤–µ—Ä–Ω–µ—Ç CNN.

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

–í–æ—Ç –æ—Ç—Ä–∏—Ü–∞—Ç–µ–ª—å–Ω—ã–µ –∑–Ω–∞—á–µ–Ω–∏—è –∏–Ω–¥–µ–∫—Å–∞ –¥–ª—è –Ω–∞—à–µ–≥–æ —Å–ø–∏—Å–æ–∫ –≤—ã—à–µ:

< td> CNN < td> -1
New York Times Washington Post BuzzFeed
-4 -3 -2

–ï—Å–ª–∏ –±—ã –º—ã —Ö–æ—Ç–µ–ª–∏ –ø–æ–ª—É—á–∏—Ç—å —ç–ª–µ–º–µ–Ω—Ç –≤ –ø–æ–∑–∏—Ü–∏–∏ –∏–Ω–¥–µ–∫—Å–∞ -1, –º—ã –º–æ–≥–ª–∏ –±—ã –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å —ç—Ç–æ—Ç –∫–æ–¥:

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

–¢–µ–ø–µ—Ä—å, –∫–æ–≥–¥–∞ –º—ã —Ä–∞—Å—Å–º–æ—Ç—Ä–µ–ª–∏ –æ—Å–Ω–æ–≤—ã —Å–ø–∏—Å–∫–æ–≤ Python, –º—ã –º–æ–∂–µ–º –ø—Ä–∏—Å—Ç—É–ø–∏—Ç—å –∫ –∏–∑—É—á–µ–Ω–∏—é –º–µ—Ç–æ–¥–æ–≤ —Å–ø–∏—Å–∫–æ–≤ Python.

–î–æ–±–∞–≤–ª–µ–Ω–∏–µ —ç–ª–µ–º–µ–Ω—Ç–æ–≤ —Å –ø–æ–º–æ—â—å—é list.append ()

–ú–µ—Ç–æ–¥ list.append () –ø–æ–∑–≤–æ–ª—è–µ—Ç –¥–æ–±–∞–≤–∏—Ç—å —ç–ª–µ–º–µ–Ω—Ç –≤ –∫–æ–Ω–µ—Ü —Å–ø–∏—Å–∫–∞. –í–æ—Ç –ø—Ä–∏–º–µ—Ä —Å–ø–∏—Å–∫–∞, –≤ –∫–æ—Ç–æ—Ä–æ–º —Ö—Ä–∞–Ω—è—Ç—Å—è –≤–∫—É—Å—ã –ø–∏—Ü—Ü—ã:

–ù–∞—à —Å–ø–∏—Å–æ–∫ —Å–æ—Å—Ç–æ–∏—Ç –∏–∑ –ø—è—Ç–∏ –∑–Ω–∞—á–µ–Ω–∏–π, –Ω–∞—á–∏–Ω–∞—è —Å–æ –∑–Ω–∞—á–µ–Ω–∏—è –∏–Ω–¥–µ–∫—Å–∞ –∏ –∑–∞–∫–∞–Ω—á–∏–≤–∞—è –∑–Ω–∞—á–µ–Ω–∏–µ –∏–Ω–¥–µ–∫—Å–∞ 4. –ù–æ —á—Ç–æ, –µ—Å–ª–∏ –º—ã —Ö–æ—Ç–∏–º –¥–æ–±–∞–≤–∏—Ç—å –≤ –Ω–∞—à —Å–ø–∏—Å–æ–∫ –≤–∞—Ä–∏–∞–Ω—Ç –¥–ª—è –ª—é–±–∏—Ç–µ–ª–µ–π –º—è—Å–∞? –ú—ã –º–æ–∂–µ–º –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –º–µ—Ç–æ–¥ append () –¥–ª—è –≤—ã–ø–æ–ª–Ω–µ–Ω–∏—è —ç—Ç–æ–≥–æ –¥–µ–π—Å—Ç–≤–∏—è. & Nbsp;

–í–æ—Ç –ø—Ä–∏–º–µ—Ä –∏—Å–ø–æ–ª—å–∑–æ–≤–∞–Ω–∏—è append () –¥–ª—è –¥–æ–±–∞–≤–ª–µ–Ω–∏—è Meat-Lovers –≤ –Ω–∞—à —Å–ø–∏—Å–æ–∫:

–ù–∞—à –∫–æ–¥ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç –Ω–∞—à –∏—Å–ø—Ä–∞–≤–ª–µ–Ω–Ω—ã–π —Å–ø–∏—Å–æ–∫ —Å Meat-Lovers –≤ –∫–æ–Ω—Ü–µ:

–í—Å—Ç–∞–≤–∏—Ç—å –≤ —Å–ø–∏—Å–æ–∫ —Å –ø–æ–º–æ—â—å—é list.insert ()

–ú–µ—Ç–æ–¥ append () –ø–æ–∑–≤–æ–ª—è–µ—Ç –¥–æ–±–∞–≤–∏—Ç—å —ç–ª–µ–º–µ–Ω—Ç –≤ –∫–æ–Ω–µ—Ü —Å–ø–∏—Å–∫–∞, –Ω–æ –µ—Å–ª–∏ –≤—ã —Ö–æ—Ç–∏—Ç–µ –¥–æ–±–∞–≤–∏—Ç—å —ç–ª–µ–º–µ–Ω—Ç –≤ –æ–ø—Ä–µ–¥–µ–ª–µ–Ω–Ω—É—é –ø–æ–∑–∏—Ü–∏—é –∏–Ω–¥–µ–∫—Å–∞, –º–µ—Ç–æ–¥ insert () –≤—Å—Ç–∞–≤–∏—Ç —ç–ª–µ–º–µ–Ω—Ç –≤ –ª—é–±–æ–µ –º–µ—Å—Ç–æ —Å–ø–∏—Å–∫–∞.

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

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

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

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

–£–¥–∞–ª–∏—Ç—å –∏–∑ —Å–ø–∏—Å–∫–∞ —Å –ø–æ–º–æ—â—å—é list.remove ()

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

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

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

–ü–æ—Å–ª–µ –ó–∞ –Ω–µ–¥–µ–ª—é —Ç–µ—Å—Ç–∏—Ä–æ–≤–∞–Ω–∏—è Jalapeno Special —Å—Ç–∞–ª–æ —è—Å–Ω–æ, —á—Ç–æ –∫–ª–∏–µ–Ω—Ç—ã –ø–∏—Ü—Ü–µ—Ä–∏–∏ –Ω–µ –æ–¥–æ–±—Ä—è—é—Ç –µ–≥–æ –≤–∫—É—Å. –ò—Ç–∞–∫, –ø–æ–≤–∞—Ä —Ö–æ—Ç–µ–ª –±—ã —É–¥–∞–ª–∏—Ç—å –µ–≥–æ –∏–∑ –º–µ–Ω—é, –ø–æ–∫–∞ –æ–Ω –≤–æ–∑–∏—Ç—Å—è —Å —Ä–µ—Ü–µ–ø—Ç–æ–º. –ú—ã –º–æ–≥–ª–∏ –±—ã –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å —Å–ª–µ–¥—É—é—â–∏–π –∫–æ–¥, —á—Ç–æ–±—ã —É–¥–∞–ª–∏—Ç—å Jalapeno Special –∏–∑ –Ω–∞—à–µ–≥–æ —Å–ø–∏—Å–∫–∞:

–ù–∞—à –∫–æ–¥ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç –∏—Å–ø—Ä–∞–≤–ª–µ–Ω–Ω—ã–π —Å–ø–∏—Å–æ–∫ –±–µ–∑ Jalapeno Special:

–ï—Å—Ç—å –Ω–µ—Å–∫–æ–ª—å–∫–æ –≤–µ—â–µ–π, –∫–æ—Ç–æ—Ä—ã–µ –≤–∞–º —Å–ª–µ–¥—É–µ—Ç –∑–Ω–∞—Ç—å –æ –º–µ—Ç–æ–¥–µ remove (). –í–æ-–ø–µ—Ä–≤—ã—Ö, –µ—Å–ª–∏ –≤—ã –ø–æ–ø—ã—Ç–∞–µ—Ç–µ—Å—å —É–¥–∞–ª–∏—Ç—å —ç–ª–µ–º–µ–Ω—Ç, –∫–æ—Ç–æ—Ä–æ–≥–æ –Ω–µ—Ç –≤ —Å–ø–∏—Å–∫–µ, –ø–æ—è–≤–∏—Ç—Å—è –æ—à–∏–±–∫–∞ not in list.. –í–æ-–≤—Ç–æ—Ä—ã—Ö, –º–µ—Ç–æ–¥ remove () —É–¥–∞–ª—è–µ—Ç —Ç–æ–ª—å–∫–æ –ø–µ—Ä–≤—ã–π —ç–∫–∑–µ–º–ø–ª—è—Ä —ç–ª–µ–º–µ–Ω—Ç–∞ —Å–ø–∏—Å–∫–∞. –ï—Å–ª–∏ –±—ã –≤ –≤–∞—à–µ–º —Å–ø–∏—Å–∫–µ –±—ã–ª–æ –¥–≤–∞ Jalapeno Specials, –≤–∞–º –ø—Ä–∏—à–ª–æ—Å—å –±—ã –¥–≤–∞–∂–¥—ã –∑–∞–ø—É—Å—Ç–∏—Ç—å –º–µ—Ç–æ–¥ remove (), —á—Ç–æ–±—ã —É–¥–∞–ª–∏—Ç—å –∏—Ö –æ–±–∞.

–£–¥–∞–ª–∏—Ç—å –∏–∑ —Å–ø–∏—Å–∫–∞ —Å –ø–æ–º–æ—â—å—é list.pop ()

–ú–µ—Ç–æ–¥ list.pop () –º–æ–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥–ª—è —É–¥–∞–ª–µ–Ω–∏—è –∏ –≤–æ–∑–≤—Ä–∞—Ç–∞ —ç–ª–µ–º–µ–Ω—Ç –∏–∑ —Å–ø–∏—Å–∫–∞.

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

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

–í–æ—Ç –∫–æ–¥, –∫–æ—Ç–æ—Ä—ã–π –º—ã –±—É–¥–µ–º –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥–ª—è —É–¥–∞–ª–µ–Ω–∏—è Meat-Lovers (–∫–æ—Ç–æ—Ä—ã–π –∏–º–µ–µ—Ç –∑–Ω–∞—á–µ–Ω–∏–µ –∏–Ω–¥–µ–∫—Å–∞ 5 –∏–∑ –Ω–∞—à–µ–≥–æ —Å–ø–∏—Å–∫–∞):

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

–ö–∞–∫ –≤–∏–¥–∏—Ç–µ, —Ñ—É–Ω–∫—Ü–∏—è pop () —É–¥–∞–ª–∏–ª–∞ —É–∫–∞–∑–∞–Ω–Ω–æ–µ –Ω–∞–º–∏ –∑–Ω–∞—á–µ–Ω–∏–µ –∏ –≤–µ—Ä–Ω—É–ª–∞ –∑–Ω–∞—á–µ–Ω–∏–µ —ç–ª–µ–º–µ–Ω—Ç–∞ —Å–ø–∏—Å–∫–∞, –∫–æ—Ç–æ—Ä—ã–π –º—ã —É–¥–∞–ª–∏–ª–∏, –≤ –¥–∞–Ω–Ω–æ–º —Å–ª—É—á–∞–µ —ç—Ç–æ Meat-Lovers. –ó–∞—Ç–µ–º –º—ã —Ä–∞—Å–ø–µ—á–∞—Ç–∞–ª–∏ –Ω–æ–≤—ã–π —Å–ø–∏—Å–æ–∫, –∫–æ—Ç–æ—Ä—ã–π –±–æ–ª—å—à–µ –Ω–µ –≤–∫–ª—é—á–∞–µ—Ç Meat-Lovers.

–û–±—ä–µ–¥–∏–Ω–∏—Ç–µ –Ω–µ—Å–∫–æ–ª—å–∫–æ —Å–ø–∏—Å–∫–æ–≤ —Å –ø–æ–º–æ—â—å—é list.extend ()

–ú–µ—Ç–æ–¥ list.extend () –º–æ–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥–ª—è –æ–±—ä–µ–¥–∏–Ω–µ–Ω–∏—è –Ω–µ—Å–∫–æ–ª—å–∫–∏—Ö —Å–ø–∏—Å–∫–æ–≤ –≤ Python. –ú–µ—Ç–æ–¥ extend () –ø—Ä–∏–Ω–∏–º–∞–µ—Ç –æ–¥–∏–Ω –∞—Ä–≥—É–º–µ–Ω—Ç: –æ–±—ä–µ–∫—Ç —Å–ø–∏—Å–∫–∞, –∫–æ—Ç–æ—Ä—ã–π –≤—ã —Ö–æ—Ç–∏—Ç–µ –¥–æ–±–∞–≤–∏—Ç—å –≤ —Å—É—â–µ—Å—Ç–≤—É—é—â–∏–π —Å–ø–∏—Å–æ–∫.

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

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

–ö–∞–∫ –≤–∏–¥–∏—Ç–µ, –Ω–∞—à —Å–ø–∏—Å–æ–∫ flavors —Ç–µ–ø–µ—Ä—å –≤–∫–ª—é—á–∞–µ—Ç —ç–ª–µ–º–µ–Ω—Ç—ã –∫–∞–∫ –∏–∑ –Ω–∞—à–µ–≥–æ —Å—Ç–∞—Ä–æ–≥–æ —Å–ø–∏—Å–∫–∞ –≤–∫—É—Å–æ–≤, —Ç–∞–∫ –∏ –∏–∑ –Ω–∞—à–µ–≥–æ —Å–ø–∏—Å–∫–∞ special_menu. < / p>

–ö–æ–ø–∏—Ä–æ–≤–∞–Ω–∏–µ —Å–ø–∏—Å–∫–∞ —Å –ø–æ–º–æ—â—å—é list.copy ()

–ú–µ—Ç–æ–¥ list.copy () –ø–æ–∑–≤–æ–ª—è–µ—Ç —Å–æ–∑–¥–∞—Ç—å –∫–æ–ø–∏—é —Å–ø–∏—Å–∫–∞. –≠—Ç–æ –º–æ–∂–µ—Ç –±—ã—Ç—å –ø–æ–ª–µ–∑–Ω–æ, –µ—Å–ª–∏ –≤—ã —Ö–æ—Ç–∏—Ç–µ –º–∞–Ω–∏–ø—É–ª–∏—Ä–æ–≤–∞—Ç—å —Å–ø–∏—Å–∫–æ–º, –Ω–æ —Å–æ—Ö—Ä–∞–Ω–∏—Ç—å –∏—Å—Ö–æ–¥–Ω—ã–π —Å–ø–∏—Å–æ–∫ –Ω–µ—Ç—Ä–æ–Ω—É—Ç—ã–º –Ω–∞ —Ç–æ—Ç —Å–ª—É—á–∞–π, –µ—Å–ª–∏ –≤–∞–º –ø–æ–Ω–∞–¥–æ–±–∏—Ç—Å—è —Å–Ω–æ–≤–∞ —Å–æ—Å–ª–∞—Ç—å—Å—è –Ω–∞ –Ω–µ–≥–æ.

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

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

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

–¢–µ–ø–µ—Ä—å —É –Ω–∞—Å –µ—Å—Ç—å –¥–≤–∞ —Å–ø–∏—Å–∫–∞ —Å —Ç–µ –∂–µ –∑–Ω–∞—á–µ–Ω–∏—è: flavors –∏ new_menu. –¢–∞–∫–∏–º –æ–±—Ä–∞–∑–æ–º, –ø–æ–≤–∞—Ä –º–æ–∂–µ—Ç –∏–∑–º–µ–Ω–∏—Ç—å new_menu, —Å–æ—Ö—Ä–∞–Ω–∏–≤ –ø—Ä–∏ —ç—Ç–æ–º —Å–ø–∏—Å–æ–∫ flavors –±–µ–∑ –∏–∑–º–µ–Ω–µ–Ω–∏–π.

–°–æ—Ä—Ç–∏—Ä–æ–≤–∫–∞ —Å–ø–∏—Å–∫–∞ —Å –ø–æ–º–æ—â—å—é list.sort ()

–ú–µ—Ç–æ–¥ list.sort () –º–æ–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥–ª—è —Å–æ—Ä—Ç–∏—Ä–æ–≤–∫–∏ —ç–ª–µ–º–µ–Ω—Ç–æ–≤ –≤ —Å–ø–∏—Å–∫–µ .

–ù–∞—à —à–µ—Ñ-–ø–æ–≤–∞—Ä —Ä–µ—à–∏–ª, —á—Ç–æ –Ω–∞—à —Å–ø–∏—Å–æ–∫ –¥–æ–ª–∂–µ–Ω –±—ã—Ç—å –æ—Ç—Å–æ—Ä—Ç–∏—Ä–æ–≤–∞–Ω –≤ –∞–ª—Ñ–∞–≤–∏—Ç–Ω–æ–º –ø–æ—Ä—è–¥–∫–µ, —á—Ç–æ–±—ã –ª—é–¥—è–º –±—ã–ª–æ –ª–µ–≥—á–µ –Ω–∞–π—Ç–∏ –ø–∏—Ü—Ü—É, –∫–æ—Ç–æ—Ä—É—é –æ–Ω–∏ –∏—â—É—Ç. –°–ª–µ–¥—É—é—â–∏–π –∫–æ–¥ –∏—Å–ø–æ–ª—å–∑—É–µ—Ç sort () , —á—Ç–æ–±—ã —Ä–∞—Å–ø–æ–ª–æ–∂–∏—Ç—å –Ω–∞—à —Å–ø–∏—Å–æ–∫ –≤ –∞–ª—Ñ–∞–≤–∏—Ç–Ω–æ–º –ø–æ—Ä—è–¥–∫–µ:

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

–í—ã —Ç–∞–∫–∂–µ –º–æ–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å —Ñ—É–Ω–∫—Ü–∏—é sort () –¥–ª—è —Å–ø–∏—Å–∫–∞ —á–∏—Å–µ–ª, –∫–æ—Ç–æ—Ä—ã–π –±—É–¥–µ—Ç —É–ø–æ—Ä—è–¥–æ—á–µ–Ω –ø–æ –≤–æ–∑—Ä–∞—Å—Ç–∞–Ω–∏—é –ø–æ—Ä—è–¥–æ–∫.

–ò–Ω–≤–µ—Ä—Ç–∏—Ä–æ–≤–∞—Ç—å —Å–ø–∏—Å–æ–∫ —Å –ø–æ–º–æ—â—å—é list.reverse ()

–ú–µ—Ç–æ–¥ list.reverse () –º–æ–∂–Ω–æ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å –¥–ª—è –∏–∑–º–µ–Ω–µ–Ω–∏—è –ø–æ—Ä—è–¥–∫–∞ —ç–ª–µ–º–µ–Ω—Ç–æ–≤ –≤ —Å–ø–∏—Å–∫–µ –Ω–∞ –æ–±—Ä–∞—Ç–Ω—ã–π.

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

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

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

–ö–∞–∫ –≤–∏–¥–∏—Ç–µ, Vegetarian Special –±—ã–ª –ø–æ—Å–ª–µ–¥–Ω–∏–º —ç–ª–µ–º–µ–Ω—Ç–æ–º –≤ –Ω–∞—à–µ–º –∏—Å—Ö–æ–¥–Ω–æ–º —Å–ø–∏—Å–∫–µ, –∞ —Ç–µ–ø–µ—Ä—å –æ–Ω –ø–µ—Ä–≤—ã–π & mdash; –Ω–∞—à —Å–ø–∏—Å–æ–∫ –±—ã–ª –ø–µ—Ä–µ–≤–µ—Ä–Ω—É—Ç.

–û—á–∏—Å—Ç–∏—Ç—å –°–ø–∏—Å–æ–∫ —Å –∏—Å–ø–æ–ª—å–∑–æ–≤–∞–Ω–∏–µ–º list.clear ()

–ú–µ—Ç–æ–¥ list.clear () –ø–æ–∑–≤–æ–ª—è–µ—Ç —É–¥–∞–ª–∏—Ç—å –≤—Å–µ –∑–Ω–∞—á–µ–Ω–∏—è –≤ —Å–ø–∏—Å–∫–µ.

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

–ù–∞—à –∫–æ–¥ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç —Å–ø–∏—Å–æ–∫ –±–µ–∑ –∑–Ω–∞—á–µ–Ω–∏–π: [].

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

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

–ú—ã —Ä–∞—Å—Å–º–æ—Ç—Ä–µ–ª–∏, –∫–∞–∫ –∏—Å–ø–æ–ª—å–∑–æ–≤–∞—Ç—å append (), insert (), remove (), pop (), extend () , copy (), sort (), reverse () –∏ clear () –ø–µ—Ä–µ—á–∏—Å–ª—è—é—Ç –º–µ—Ç–æ–¥—ã –≤ —ç—Ç–æ–º –≤ —Å—Ç–∞—Ç—å–µ –∏ —Ä–∞—Å—Å–º–æ—Ç—Ä–µ–Ω—ã –ø—Ä–∏–º–µ—Ä—ã –∫–∞–∂–¥–æ–≥–æ –º–µ—Ç–æ–¥–∞ –≤ –¥–µ–π—Å—Ç–≤–∏–∏.

–¢–µ–ø–µ—Ä—å –≤—ã –≥–æ—Ç–æ–≤—ã —Ä–∞–±–æ—Ç–∞—Ç—å —Å –º–µ—Ç–æ–¥–∞–º–∏ —Å–ø–∏—Å–∫–∞ Python, –∫–∞–∫ —ç–∫—Å–ø–µ—Ä—Ç!