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 find absolute value of a number in the list

  1. Home
  2. Python Programs

Write a python program to find absolute value of a number in the list

Write a python program to find absolute value of a number in the list

Program
def myfun():
    list1 = [-12, -45, -67, -89, -34, 67, -13]
    list2=[abs(num) for num in list1]
    print(list2)

if __name__=="__main__":
    myfun()



Output:

[12, 45, 67, 89, 34, 67, 13]



More Questions


37 . Write a python program to find absolute value of a number in the list
38 . Write a python program to adding a thousand separator
39 . Write a python program startswith and Endswith Methods
40 . Write a python program to print Nlargest numbers
41 . Write a python program to print Nsmallest numbers
42 . Write a python program to check two strings are Anagram or not
43 . Write a python program to checking internet speed
44 . Write a python program to print reserved keywords
45 . Write a python program to print properties and methods
46 . Write a python program to open a website using python
47 . Write a python program to print most frequent letter in a string



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 find largest and second largest in an array

Write a Program to remove duplicate element in an array

Write a Java program to swap the first and last elements of an array and create a new array

Write a java program to add two matrix

Write a Program to find second largest number in an array

Python Practice Programs

Write a python program to adding a thousand separator

Write a python program to print reserved keywords

Write a Python program to calculate the sum of three given numbers. If the values are equal, return three times their sum.

Python Program to Replace all Occurrences of ‘a’ with $ in a String

Write a Python program to count number of digits in an integer

Java Quiz

Java Quiz - 23

Java Quiz - 11

Java Quiz - 6

Java Quiz - 8

Java Quiz - 4

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