Question: Using Python 3: Write a program that asks the user for two lists of numbers separated by commas and prints out a list of numbers
Using Python 3: Write a program that asks the user for two lists of numbers separated by commas and prints out a list of numbers that appear in both lists (no duplicates). Make sure the program works when the lists have different lengths.
Sample input/output:
Enter list 1: 3, 10, 12, -4, 20, 1000
Enter list 2: 5, 6, 3, 20, 4, 0, 10
Output: [3, 20, 10]
The input() function in Python 3 allows you to accept input from the user on the command line.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
