Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara Challenge 2: Sorting Lists | Lists, Loops And Functions
Python: For Beginners
Sezione 2. Capitolo 2
single

single

Challenge 2: Sorting Lists

Scorri per mostrare il menu

Look at the example below to understand how sorting works.

1234
numbers = [3, 1, 4, 1, 5] numbers.sort() print("sorted:", numbers) #prints the sorted list print('done')

Now let's move on to the task.

Compito

Scorri per iniziare a programmare

Fill the array you were given with cities you like.

  • create a variable called cities;
  • add at least 3 cities to it;
  • print the result;

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 2
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

some-alt