Skip to main content
Commonmark migration
Source Link

#Python 2, 44 bytes

Python 2, 44 bytes

for x in range(11):print bin(x)[2:].zfill(4)

This uses the zfill function which works like rjust except it always padds with 0 so you don't waste bytes on an argument.

#Python 2, 44 bytes

for x in range(11):print bin(x)[2:].zfill(4)

This uses the zfill function which works like rjust except it always padds with 0 so you don't waste bytes on an argument.

Python 2, 44 bytes

for x in range(11):print bin(x)[2:].zfill(4)

This uses the zfill function which works like rjust except it always padds with 0 so you don't waste bytes on an argument.

added Python 2
Source Link
Wheat Wizard
  • 100k
  • 22
  • 282
  • 661

#Python 2, 44 bytes

for x in range(11):print bin(x)[2:].zfill(4)

This uses the zfill function which works like rjust except it always padds with 0 so you don't waste bytes on an argument.

#Python, 44 bytes

for x in range(11):print bin(x)[2:].zfill(4)

This uses the zfill function which works like rjust except it always padds with 0 so you don't waste bytes on an argument.

#Python 2, 44 bytes

for x in range(11):print bin(x)[2:].zfill(4)

This uses the zfill function which works like rjust except it always padds with 0 so you don't waste bytes on an argument.

Source Link
Wheat Wizard
  • 100k
  • 22
  • 282
  • 661

#Python, 44 bytes

for x in range(11):print bin(x)[2:].zfill(4)

This uses the zfill function which works like rjust except it always padds with 0 so you don't waste bytes on an argument.