Answers for "object to map in python"

0

use map in python to take input

c = map(int,input().split)
Posted by: Guest on July-05-2020
2

pyhton map

def calculateSquare(n):
    return n*n


numbers = (1, 2, 3, 4)
result = map(calculateSquare, numbers)
print(result)

# converting map object to set
numbersSquare = list(result)
print(numbersSquare)
Posted by: Guest on July-12-2020

Python Answers by Framework

Browse Popular Code Answers by Language