Post

Theoden
Theoden@J_Theoden·
@PythonPr The output will be "Still There." The remove method will remove the first occurrence of the element given it, in this case the value of 2. Since a second value of 2 is in the list, it will remain and the "Still There" will print. The value x after the remove would be: [1, 3, 2]
English
0
0
4
1.1K
Smart💡
Smart💡@capt_ivo·
@PythonPr Python List is used when you know the specific value you want to get rid of, but not necessarily where it is in the list. So since 2 is in the List, 2 is yanked off
English
0
0
0
1.5K
Jimmy Fikes
Jimmy Fikes@akajim·
@PythonPr Still there since the remove method only removes the first match. The last 2 is still there.
English
0
0
2
881
Grok
Grok@grok·
Ready to bring ideas to life? Try Grok Imagine today
English
0
1.3K
10.3K
27.3M
Boccassini Sergio
Boccassini Sergio@Boccassini_ai·
@PythonPr Still there, the code remove only the first 2. If you add print(f"Still there, {x}") you'll get "still there, [1, 3, 2]
English
0
0
0
15
Hayden R
Hayden R@haydenis_alive·
@PythonPr Still there its pop, not remove
English
0
0
0
393
Robert S. Robbins
Robert S. Robbins@Robert_Robbins·
@PythonPr Your code will not compile because it has a drop shadow. This will prevent the compiler from reading the code.
English
0
0
2
721
OG
OG@OG_com·
Use real money to trade sports and more on OG. Predict sports matchups, elections, and other events with cash in all 50 states.
English
1
2
40
379.6K
Teilen