Sorted Numbers Copy (Exercise)
00:00
Time to copy a list and sort some numbers. Start by creating a list that contains the integers from four all the way to one. So 4, 3, 2, 1
should be the items in the list and then assign it to the variable numbers
.
00:15
Then you should create a copy of the numbers
list using the slice notation where you do the [:]
. Keep in mind this creates a shallow copy, but it doesn’t really matter that much for this task.
00:29
Then you want to sort the copy of the numbers
list in numerical order using the .sort()
method. So numbers
should stay as it is and a copy of the numbers
list.
00:38
You should sort it, and then you want to display both numbers
and the copy you made and prove that they look differently. Basically that the order of the integers in there is different.
Bartosz Zaczyński RP Team on Feb. 13, 2024
@NaplesDave This feature is enabled by default. I’m not even sure if you can disable it. What you can do, though, is go to the settings menu and configure the delay before these popups appear. You may be typing too fast before these popups get a chance to show up.
Become a Member to join the conversation.
NaplesDave on Feb. 12, 2024
While you are using IDLE you are getting Popup hints and drop-down pick lists while you are coding in the IDE. I want those too in my environment. I am using IDLE 3.11.0 64bit on Windows 11. Can you tell me how to enable that behavior for my IDLE IDE?