Python Tutorial
Home
Python
Python Basic
Python Hand-on tutorial
Problem Solving
Python Advance Topic
Django
Artificial Intelligence
MySQL
Matchine Learning
Matchine Learning Tutorial
Motivation
......
About us
Contact us
Jobs
Affiliate disclosure
Privacy policy
Pages
Diff between 2
3. Write a python program to get the difference between the two list
# Input
# list1 = [1, 2, 3, 4]
# list2 = [1, 2]
#Solution:
list1 = [
1
,
2
,
3
,
4
] list2 = [
1
,
2
]
print
(
list
(
set
(list1) -
set
(list2)))
No comments:
Post a Comment
< Previous
Next >
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment