subject

1. What is the output of the following code? sampleList = [10, 20, 30, 40]
del sampleList[0:6]
print(sampleList)

2. What is the output of the following code
aList = ["PYnative", [4, 8, 12, 16]]
print(aList[0][1])
print(aList[1][3])

3. What is the output of the following list operation
sampleList = [10, 20, 30, 40, 50]
print(sampleList[-2])
print(sampleList[-4:-1])

4. What is the output of the following list operation
aList = [10, 20, 30, 40, 50, 60, 70, 80]
print(aList[2:5])
print(aList[:4])
print(aList[3:])

5. What is the output of the following list assignment
aList = [4, 8, 12, 16]
aList[1:4] = [20, 24, 28]
print(aList)
[4, 20, 24, 28, 8, 12, 16]
[4, 20, 24, 28]

6. What is the output of the following list function?
sampleList = [10, 20, 30, 40, 50]
sampleList. append(60)
print(sampleList)

sampleList. append(60)
print(sampleList)

7. What is the output of the following
aList = [5, 10, 15, 25]
print(aList[::-2])
[15, 10, 5]
[10, 5]
[25, 10]

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 16:00
Page orientation can be either landscape or
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Jean has kept the content of her website limited to what is important; she has also ensured that the text follows a particular style and color all throughout her website. which website features has jean kept in mind? jean has limited the content of her website to what is important; this ensures (clarity, simplicity, harmony and unity) of the content. she has also formatted the text in a particular style and color throughout her website, ensuring (balance, simplicity, consistency)
Answers: 2
question
Computers and Technology, 24.06.2019 14:00
What are the different components of the cloud architecture?
Answers: 2
question
Computers and Technology, 24.06.2019 18:30
Dereck works for long hours on his computer.  he frequently experiences physical strain by the end of the day because he does not follow an important rule of ergonomics with respect to the use of keyboards.  which of the following actions of dereck could lead to physical strain? a.  placing the keyboard exactly in front of him while typingb.  keeping hands and wrists straight while typingc.  using wrist pads throughout the dayd.  pounding at the keys on the keyboard while typinge.  resting his hands on the keyboard when he is not typing
Answers: 1
You know the right answer?
1. What is the output of the following code? sampleList = [10, 20, 30, 40]
del sampleList[0:6...
Questions
question
Mathematics, 09.04.2021 01:00
question
Mathematics, 09.04.2021 01:00
question
Mathematics, 09.04.2021 01:00
question
World Languages, 09.04.2021 01:00
question
Mathematics, 09.04.2021 01:00
Questions on the website: 13722363