Question
Python 3 help!!! 1. Given the lists, lst1 and lst2, create a new sorted list consisting of all the elements of lst1 that do not
Python 3 help!!!
1.Given the lists, lst1 and lst2, create a new sorted list consisting of all the elements of lst1 that do not appear in lst2 together with all the elements of lst2 that do not appear in lst1. For example, if lst1 is [4, 3, 2, 6, 2] and lst2 is [1, 2, 4, 1, 5], then the new list would be [1, 1, 3, 5, 6]. Note that duplicate elements are also duplicated in the new list. Associate the new list with the variable new_list, and don't forget to sort the new list.
2.Given the list my_list containing integers, create a list consisting of all the even elements of my_list. Associate the new list with the variable new_list.
3.Create a list consisting of the negative values in the list numbers. Associate the new list with the variable negatives.
4.The factors of an integer are those numbers that evenly divide into the integer. Given the integer n, create a list of all the factors of n, excluding 1 and nitself. The list should be ordered from smallest to largest. Associate the new list with the variable factors.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started