Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
list function
lucky_numbers = [4, 8, 15, 16, 23, 42] friends = ["Kevin", "Karen", "Jim", "Oscar", "Toby"] friends.extend(lucky_numbers) print(friends) lucky_numbers = [4, 8, 15, 16, 23, 42] friends = ["Kevin", "Karen", "Jim", "Oscar", "Toby"] friends.append("creed") print(friends) lucky_numbers = [4, 8, 15, 16, 23, 42] friends = ["Kevin", "Karen", "Jim", "Oscar", "Toby"] friends.remove("Jim") print(friends) lucky_numbers = [4, 8, 15, 16, 23, 42] friends = ["Kevin", "Karen", "Jim", "Oscar", "Toby"] friends.index("Jim") print(friends.index("Jim")) lucky_numbers = [4, 8, 15, 16, 23, 42] friends = ["Kevin", "Karen", "Jim", "Oscar", "Toby"] friends.count("Kevin") print(friends.count("Kevin")) lucky_numbers = [4, 8, 15, 16, 23, 42] friends = ["Kevin", "Karen", "Jim", "Oscar", "Toby"] friends.sort() print(friends) lucky_numbers = [4, 8, 15, 16, 23, 42] friends = ["Kevin", "Karen", "Jim", "Oscar", "Toby"] lucky_numbers.sort() print(lucky_numbers) lucky_numbers = [4, 8, 15, 16, 23, 42] friends = ["Kevin", "Karen", "Jim", "Oscar", "Toby"] lucky_numbers.reverse() print(lucky_numbers) lucky_numbers = [4, 8, 15, 16, 23, 42] friends = ["Kevin", "Karen", "Jim", "Oscar", "Toby"] friends2 = friends.copy() print(friends2)
run
|
edit
|
history
|
help
0
http_request
Data structures
Code2
trial
single_digit
gameboy
Dictionary
Aisha Wall
student grades
Gus Hw Help