Project Level 1: Beginner
This project is designed for beginner learners who are still learning and practicing Python fundamentals.
Project Description
Lists are one of the most heavily used datatypes in Python. They are designed to store multiple other Python datatypes such as numbers, strings, and any other type. For today’s task, you need to process the following two lists:
list1 = [5, 3, 8, 6, 3]
list2 = [7, 2, 5, 9, 8]
Specifically, your task is to:
Place the two lists in a .py file.
Add some code that combines the two lists into one single list.
Removes any duplicates from the combined list.
Sort the combined list in ascending order.
Print out the sorted list.
Here is what your program should print out:
Learning Benefits
List Operations: Practice combining and modifying lists.
Data Structures: Understand how to use
set
to remove duplicates.Sorting: Learn how to sort lists with the
sort()
method.
Prerequisites
Required Libraries: No libraries are needed for this project.
Required Files: No files are needed for this project.
IDE: You can use any IDE on your computer to code the project.
Danger Zone
We are providing different solutions for this project. You will find the code for each solution along with explanations in the following button: