#! bpy
"""
Name: 'berlin-clock.py'
Blender: 27x
Group: 'Example'
Tooltip: 'generate a  berlin-clock'
"""
import bpy

clock = ["#",
         "####",
         "####",
         "##########",
         "####"]


def create(object):
    """Create and compose a berlin-clock"""

    rows = len(object)

    for row in range(rows):
        cols = len(object[row])
        for col in range(cols):
            bpy.ops.mesh.primitive_cube_add(location=(row, col, 0))

if __name__ == '__main__':
    bpy.ops.object.select_by_type(type='MESH')
    bpy.ops.object.delete()
    create(clock)