Ad
Code
Diff
  • find_multiples=lambda b,s:[*range(b,s+1,b)]
    • # find_multiples= lambda b, l:[x for x in range(b,l+1,b)]
    • find_multiples=lambda b,s:list(range(b,s+1,b))
    • find_multiples=lambda b,s:[*range(b,s+1,b)]
Algorithms
Logic
Code
Diff
  • def get_nth_words(string, n):
        return " ".join(string.split()[n-1::n]) if n>0 else ""
    • get_nth_words = lambda string, n: " ".join(string.split()[n-1::n]) if n>0 else ""
    • def get_nth_words(string, n):
    • return " ".join(string.split()[n-1::n]) if n>0 else ""