Scripting >> Python >> Examples >> Advanced >> How to use map function

 

Example 1 : read a list of integers from standard input, split and run the map function to apply the int() function on each

L = map( int, raw_input().split() )