Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # b_str_matrix_of_4.py
- import string
- ww = 100
- hh = 100
- alpha = string.letters
- xy = [[] for z in range(ww*hh)]
- abc = []
- for x in alpha:
- for y in alpha+'0123456789':
- for z in alpha+'0123456789':
- t = x+y+z
- if not t.isalpha():
- exec(t+'=(255,255,0)')
- abc.append(t)
- L = len(abc)
- print L
- for y in range(hh):
- for x in range(ww):
- t = y*ww+x
- xy[t] += [abc[y]]
- xy[t] += [abc[x+ww]]
- xy[t] += [abc[y+ww*2-x]]
- xy[t] += [abc[y+ww*3+x]]
- 0
- matrix = '['+','.join(['({}+{}+{}+{})'.format(*z) for z in xy])+']'
- print matrix
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement