MSK Technologies

Home
Practice Programs
Java Programs Python Programs Java Quiz
Pages
Python Java Material PLSQL Material
Search A Job

Write a python program to display list of numbers and we want to return all the numbers from the list that are divisible by 2 and remove duplicates at the same time.

  1. Home
  2. Python Programs

Write a python program to display list of numbers and we want to return all the numbers from the list that are divisible by 2 and remove duplicates at the same time.

Write a python program to display list of numbers and we want to return all the numbers from the list that are divisible by 2 and remove duplicates at the same time.

Program
def myfun():
    arr = [10, 23, 30, 30, 40, 45, 50]
    new_set = {num for num in arr if num % 2 == 0}
    print(new_set)            
if __name__=="__main__":
    myfun()



Output:

{40, 10, 50, 30}



More Questions


57 . Write a python program to convert uppercase strings and we want to convert them into lowercase strings and remove duplicates ?
58 . Write a python program to display list of numbers and we want to return all the numbers from the list that are divisible by 2 and remove duplicates at the same time.
59 . Write a python program to calculate average using python *args ?
60 . Write a Python program to find the area of a triangle.
61 . Write a Python program to convert kilometers to miles.
62 . Write a Python program to convert Celsius to Fahrenheit.
63 . Write a Python Program to Check if a Number is Positive, Negative or Zero.
64 . Write a Python Program to Check if a Number is Odd or Even.
65 . Write a Python Program to Check Leap Year.
66 . Write a Python Program to Check Prime Number.
67 . Write a Python Program to Print all Prime Numbers in an Interval of 1-10.



For latest job updates join Telegram Channel: https://t.me/sateeshm

Interview Questions

Java Interview Questions

Python Interview Questions

Oracle Interview Questions

100 Most Asked Java Interview Questions and Answers

HR Interview Questions and Answers

Top 50 OOPS Interview Questions & Answers

Apply For The Job

Apply For Job

Java Material

Python Material

PLSQL Material

.Net Material

Java Practice Programs

400 Java Programs

Java Practice Programs

Write a java Program to print palindrome number upto N numbers

Write a Java program to count the letters, spaces, numbers and other characters of an input string

Write a Java program to compare two numbers

Write a Java program to convert a binary number to decimal number

Write a Java program to print the ascii value of a given character

Python Practice Programs

Write a Python program to find out what version of Python you are using.

Write a python program to check two strings are Anagram or not

Write a Python Program to Make a Simple Calculator with 4 basic mathematical operations.

Write a Python Program to find sum of array.

Write a python program to print Nlargest numbers

Java Quiz

Java Quiz - 8

Java Quiz - 5

Java Quiz - 13

Java Quiz - 11

Java Quiz - 7

Courses
Java Python PLSQL .Net ADO.Net About Us
Quick Links
Daily Use English Sentences Daily General Knowledge General Knowledge Latest Update Inventions and Inventors జనరల్ నాలెడ్జ్ General Knowledge Spoken English Spoken Hindi GK Hindi Telugu Facts Unknown Facts Psychology Facts Motivation Quotes విటమిన్ - సి,డి,ఇ,కె Android
Spiritual
రాధాకృష్ణ భగవద్గీత Motivation Quotes Slokas Talapatra Nidhi ఆధ్యాత్మిక భక్తి ప్రపంచం Sadhguru Sai Motivation Quotes గౌతమ బుద్ధుడు Bhagavad Gita Quotes
New Updates
MSK Technologies
© sateeshm, All Right Reserved. Designed By sateeshm
Home Help FQAs