Sezione 1. Capitolo 8
single
Challenge: Unpacking Multiple Elements
Scorri per mostrare il menu
Compito
Scorri per iniziare a programmare
Given a list of arbitrary length, write a function that unpacks the first two and last two elements and returns them as a tuple, using the * operator.
- Unpack the first two elements from the beginning of
list. - Unpack the last two elements from the end of
list. - Return a tuple in the order: first element, second element, second-to-last element, last element.
Soluzione
Tutto è chiaro?
Grazie per i tuoi commenti!
Sezione 1. Capitolo 8
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione