214k views
0 votes
Write python code to count all the list items. Your code can not be more than one line x=[2," two", [1,2,3],[4],{5},6,7,8] 2 points I want to select ["second", "third", "fourth"] from the list x = ["first", "second", "third", "fourth", "fifth"]. Write python code expression in one line, 2 points The end result needs to be x=[1,2,3,4,5,6,7] by adding these two lists x=[1,2,3,4] y=[5,6,7]. Write python code in one line. You need to use a predefined method to solve this problem. 2 points Write one line of code to delete 7 from the list x=[


a

,2,

c

,7,9,11]

User Satya
by
7.8k points

1 Answer

3 votes

Answer:

1. `len(x)`

2. `x[1:4]`

3. `x = [1,2,3,4] + [5,6,7]`

4. `x.remove(7)`

User Lukasz Czerwinski
by
8.5k points

No related questions found