def myfun(): list1 = [-12, -45, -67, -89, -34, 67, -13] list2=[abs(num) for num in list1] print(list2) if __name__=="__main__": myfun()
[12, 45, 67, 89, 34, 67, 13]
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 Job
Java Material
Python Material
PLSQL Material
.Net Material
Java Practice Programs
400 Java 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
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 - 23
Java Quiz - 11
Java Quiz - 6
Java Quiz - 8
Java Quiz - 4