Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def generateList(isOk, start, end):
- if start > end:
- return []
- if isOk(start):
- return [start] + generateList(isOk, start + 1, end)
- return generateList(isOk, start + 1, end)
- a = int(input("a="))
- b = int(input("b="))
- print(generateList(lambda x: x % 7 == 0, a, b))
Add Comment
Please, Sign In to add comment