I wanted to make a pattern in form-

            a
          b b
        c c c
      d d d d

so far i've reached

a
a b
a b c
a b c d

with this code

 for a in range (0,4):
    count=0
    for y in range(0,a+1):
            print chr(ord('a')+ count),
            count+=1
    print

please help?

Play around with this:

count = 1
for c in "abcde":
    s = c * count
    count += 1
    s = s.zfill(5)
    s = s.replace('0', ' ')
    print s
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.