Write a program below that will demonstrate the different characteristics and methods of the data type list. 1. Type the following code on your Python script. 1 List_1= [1,2,2,3,4,5] 2 List 2 [6,7,8,7,10] List_3 List_1 + List_2 3 5 print (List_3) 6 print(list_1[0] 7 print(list_2[::-1]) 8 9 List_4 List_1.copy() 10 print (List 4) 11 List 2.append(88) 12 print (List 2) 13 14 List_1.pop(1) 15 print (List 1) 16 List 2.remove(10) 17 List 2.insert(4, 'a9') 18 print (List 2) 2. Run the program and explain the codes in line 5, line 6 and line 7. 3. What does the methods .copy() and .append() do? 4. Explain the difference between the methods .pop() and .remove(). What does 4 and 'a9' mean in line 17?

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Direction: Answers must be explained properly and thoroughly. You have to insert a screenshot of the results. Include the observations of your code.

Python download: https://www.python.org/downloads/ 
Any Python Version 3.8 and later is recommended

Programming Demo 3: Characteristics and Methods of Lists
Write a program below that will demonstrate the different characteristics and methods of
the data type list.
1. Type the following code on your Python script.
1
List_1 = [1,2,2,3,4,5]
2
List 2 = [6,7,8,7,10]
3
List_3 = List_1 + List_2
4
5
print(list_3)
6 print(list_1[0]
7
print(list_2[::-1])
8
9 List_4 = List_1.copy()
10 print (List 4)
11 List 2.append(88)
12 print (List_2)
13
14 List_1.pop(1)
15 print (List_1)
16 List_2.remove(10)
17 List_2.insert(4, '09')
18 print (list_2)
2. Run the program and explain the codes in line 5, line 6 and line 7.
3. What does the methods .copy() and .append() do?
4. Explain the difference between the methods .pop() and .remove(). What does 4
and 'a9' mean in line 17?
Transcribed Image Text:Programming Demo 3: Characteristics and Methods of Lists Write a program below that will demonstrate the different characteristics and methods of the data type list. 1. Type the following code on your Python script. 1 List_1 = [1,2,2,3,4,5] 2 List 2 = [6,7,8,7,10] 3 List_3 = List_1 + List_2 4 5 print(list_3) 6 print(list_1[0] 7 print(list_2[::-1]) 8 9 List_4 = List_1.copy() 10 print (List 4) 11 List 2.append(88) 12 print (List_2) 13 14 List_1.pop(1) 15 print (List_1) 16 List_2.remove(10) 17 List_2.insert(4, '09') 18 print (list_2) 2. Run the program and explain the codes in line 5, line 6 and line 7. 3. What does the methods .copy() and .append() do? 4. Explain the difference between the methods .pop() and .remove(). What does 4 and 'a9' mean in line 17?
Expert Solution
steps

Step by step

Solved in 5 steps with 1 images

Blurred answer
Knowledge Booster
Lists
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education