Skip to main content
-4 bytes
Source Link
Martmists
  • 439
  • 2
  • 9

Python 3, 169 101 93 91 8585 81 bytes

lambda s,j="".join:j(chr(int(j(str(int(b<"C")'01'[b<"C"])for b in c[::4]),2))for c in s.split())

Try it online!Try it online!

Explanation:

lambda s,j="".join:  # Create a lambda function
    j(  # call "".join, adds characters together with nothing in between
        chr(  # character by int
            int(  # string to int
                j(  # "".join again
                    str(int(b<"C"))'01'[b<"C"]  # 1 or 0, based on what character we get
                    for b in c[::4]  # For every first of 4 characters
                ),
                2)  # Base 2
        )
        for c in s.split()  # for every group of Fizz and Buzz with any whitespace character after it
    )

Python 3, 169 101 93 91 85 bytes

lambda s,j="".join:j(chr(int(j(str(int(b<"C"))for b in c[::4]),2))for c in s.split())

Try it online!

Explanation:

lambda s,j="".join:  # Create a lambda function
    j(  # call "".join, adds characters together with nothing in between
        chr(  # character by int
            int(  # string to int
                j(  # "".join again
                    str(int(b<"C"))  # 1 or 0, based on what character we get
                    for b in c[::4]  # For every first of 4 characters
                ),
                2)  # Base 2
        )
        for c in s.split()  # for every group of Fizz and Buzz with any whitespace character after it
    )

Python 3, 169 101 93 91 85 81 bytes

lambda s,j="".join:j(chr(int(j('01'[b<"C"])for b in c[::4]),2))for c in s.split())

Try it online!

Explanation:

lambda s,j="".join:  # Create a lambda function
    j(  # call "".join, adds characters together with nothing in between
        chr(  # character by int
            int(  # string to int
                j(  # "".join again
                    '01'[b<"C"]  # 1 or 0, based on what character we get
                    for b in c[::4]  # For every first of 4 characters
                ),
                2)  # Base 2
        )
        for c in s.split()  # for every group of Fizz and Buzz with any whitespace character after it
    )
remove 6 bytes
Source Link
Martmists
  • 439
  • 2
  • 9

Python 3, 169 101 93 9191 85 bytes

print(""lambda s,j="".join:j(chr(int("".joinj(str(int(b<"C"))for b in c[::4]),2))for c in input()s.split()))

Try it online!

Explanation:

print(lambda s,j="".join:  # Create a lambda function
    "".joinj(  # Joincall all"".join, stringsadds characters together with nothing betweenin thembetween
        chr(  # get character by int
            int("".join(  # turn string ofto numbersint
 into int              j(  # "".join again
                    str(int(b<"C"))  # Get 1 or 0, dependingbased on thewhat character we get
                    for b in c[::4]),  # Do the above forFor every first of 4 characters
                ),
                2)  # Base 2
        )
        for c in inputs.split()  # Do the above for every chunkgroup of Fizz and Buzz ended bywith aany whitespace character after it
    )
)

Python 3, 169 101 93 91 bytes

print("".join(chr(int("".join(str(int(b<"C"))for b in c[::4]),2))for c in input().split()))

Try it online!

Explanation:

print(
    "".join(  # Join all strings with nothing between them
        chr(  # get character by int
            int("".join(  # turn string of numbers into int
                str(int(b<"C"))  # Get 1 or 0, depending on the character
                for b in c[::4]),  # Do the above for every first of 4 characters
            2)  # Base 2
        )
        for c in input.split()  # Do the above for every chunk of Fizz and Buzz ended by a whitespace character
    )
)

Python 3, 169 101 93 91 85 bytes

lambda s,j="".join:j(chr(int(j(str(int(b<"C"))for b in c[::4]),2))for c in s.split())

Try it online!

Explanation:

lambda s,j="".join:  # Create a lambda function
    j(  # call "".join, adds characters together with nothing in between
        chr(  # character by int
            int(  # string to int
                j(  # "".join again
                    str(int(b<"C"))  # 1 or 0, based on what character we get
                    for b in c[::4]  # For every first of 4 characters
                ),
                2)  # Base 2
        )
        for c in s.split()  # for every group of Fizz and Buzz with any whitespace character after it
    )
Add explanation
Source Link
Martmists
  • 439
  • 2
  • 9

Python 3, 169 101 9393 91 bytes

print("".join([chrchr(int("".join(str(int(b<"C"))for b in c[::4]),2))for c in input().split()]))

Try it online!Try it online!

Explanation:

print(
    "".join(  # Join all strings with nothing between them
        chr(  # get character by int
            int("".join(  # turn string of numbers into int
                str(int(b<"C"))  # Get 1 or 0, depending on the character
                for b in c[::4]),  # Do the above for every first of 4 characters
            2)  # Base 2
        )
        for c in input.split()  # Do the above for every chunk of Fizz and Buzz ended by a whitespace character
    )
)

Python 3, 169 101 93 bytes

print("".join([chr(int("".join(str(int(b<"C"))for b in c[::4]),2))for c in input().split()]))

Try it online!

Python 3, 169 101 93 91 bytes

print("".join(chr(int("".join(str(int(b<"C"))for b in c[::4]),2))for c in input().split()))

Try it online!

Explanation:

print(
    "".join(  # Join all strings with nothing between them
        chr(  # get character by int
            int("".join(  # turn string of numbers into int
                str(int(b<"C"))  # Get 1 or 0, depending on the character
                for b in c[::4]),  # Do the above for every first of 4 characters
            2)  # Base 2
        )
        for c in input.split()  # Do the above for every chunk of Fizz and Buzz ended by a whitespace character
    )
)
deleted 129 characters in body; deleted 15 characters in body
Source Link
Martmists
  • 439
  • 2
  • 9
Loading
Source Link
Martmists
  • 439
  • 2
  • 9
Loading