Skip to main content
added 4 characters in body
Source Link
RootTwo
  • 2.1k
  • 10
  • 8

Python 3, 89 77 bytes

more golfed version based on the same idea:

def f(s): for a in s:print(*map('{:>4}'.format,[*a,*a.encode()]),end='\n\n') 

If there are '\t's in the input, then change the 4 to a 9.

Prior version:

def f(s): for l in s: print(*l,sep='\t',end='');print(*l.encode(),sep='\t',end='\n\n') 

Takes a list of strings, each ending with a '\n'.

Python 3, 89 77 bytes

more golfed version based on the same idea:

def f(s): for a in s:print(*map('{:>4}'.format,[*a,*a.encode()]),end='\n\n') 

If there '\t's in the input, then change the 4 to a 9.

Prior version:

def f(s): for l in s: print(*l,sep='\t',end='');print(*l.encode(),sep='\t',end='\n\n') 

Takes a list of strings, each ending with a '\n'.

Python 3, 89 77 bytes

more golfed version based on the same idea:

def f(s): for a in s:print(*map('{:>4}'.format,[*a,*a.encode()]),end='\n\n') 

If there are '\t's in the input, then change the 4 to a 9.

Prior version:

def f(s): for l in s: print(*l,sep='\t',end='');print(*l.encode(),sep='\t',end='\n\n') 

Takes a list of strings, each ending with a '\n'.

added 241 characters in body
Source Link
RootTwo
  • 2.1k
  • 10
  • 8

Python 3, 8989 77 bytes

more golfed version based on the same idea:

def f(s): for a in s:print(*map('{:>4}'.format,[*a,*a.encode()]),end='\n\n') 

If there '\t's in the input, then change the 4 to a 9.

Prior version:

def f(s): for l in s: print(*l,sep='\t',end='');print(*l.encode(),sep='\t',end='\n\n') 

Takes a list of strings, each ending with a '\n'.

Python 3, 89 bytes

def f(s): for l in s: print(*l,sep='\t',end='');print(*l.encode(),sep='\t',end='\n\n') 

Takes a list of strings, each ending with a '\n'.

Python 3, 89 77 bytes

more golfed version based on the same idea:

def f(s): for a in s:print(*map('{:>4}'.format,[*a,*a.encode()]),end='\n\n') 

If there '\t's in the input, then change the 4 to a 9.

Prior version:

def f(s): for l in s: print(*l,sep='\t',end='');print(*l.encode(),sep='\t',end='\n\n') 

Takes a list of strings, each ending with a '\n'.

Source Link
RootTwo
  • 2.1k
  • 10
  • 8

Python 3, 89 bytes

def f(s): for l in s: print(*l,sep='\t',end='');print(*l.encode(),sep='\t',end='\n\n') 

Takes a list of strings, each ending with a '\n'.