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
Apply For Job
Java Material
Python Material
PLSQL Material
.Net Material
Java Practice Programs
400 Java Programs
Write a Java program to compare two numbers
Write a Java program to count the number of even and odd elements in a given array
Write a java Program to print N prime numbers and find sum and average
Write a Java program and compute the sum of the digits of an integer
Write a Java program to check if a positive number is a palindrome or not
Write a python program to checking if a string is empty or not ?
Write a Python program to count number of vowels in the given string
Write a Python program that concatenates all elements in a list into a string and returns it.
Write a python program to print lowercase names
Write a python program to print flatten a nested list
Java Quiz - 2
Java Quiz - 11
Java Quiz - 1
Java Quiz - 8
Java Quiz - 18