Ad
Code
Diff
  • converter = lambda n: 'zero.one.two.three.four.five.six.seven.eight.nine.ten'.split(".")[n]
    • def converter(number: int, /) -> str:
    • if 10 > number:
    • return '0123456789'[number]
    • else:
    • return encode(number // 10) + '0123456789'[number % 10]
    • converter = lambda n: 'zero.one.two.three.four.five.six.seven.eight.nine.ten'.split(".")[n]
Algorithms
Logic
Code
Diff
  • get_nth_words=lambda s,n:""if n<=0else " ".join(s.split()[n-1::n])
    • get_nth_words=lambda s,n: ""if n<=0else " ".join(s.split()[n-1::n])
    • get_nth_words=lambda s,n:""if n<=0else " ".join(s.split()[n-1::n])
Algorithms
Logic
Code
Diff
  • get_nth_words=lambda s,n: ""if n<=0else " ".join(s.split()[n-1::n])
    • get_nth_words = lambda string, n: "" if n<=0 else " ".join(string.split()[n-1::n])
    • get_nth_words=lambda s,n: ""if n<=0else " ".join(s.split()[n-1::n])