Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- """
- Stream.of(1, 2, 3, 4, 5)
- .map(i -> Math.pow(i, 2))
- .filter(i -> i / 3 < Math.sqrt(i))
- .collect(Collectors.toList())
- .forEach(System.out::println);
- """
- import math
- for i in filter(lambda i: i/3 < math.sqrt(i),
- map(lambda i: i**2, [1, 2, 3, 4, 5])):
- print(i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement