Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def upperSwitch(l1,l2):
- l = len(l1)
- output = []
- for i in range(l):
- temp = []
- for j in range(l):
- if ord(l1[i][j]) >= 97 and ord(l2[i][j]) >= 97:
- temp.append("**")
- elif ord(l1[i][j]) < 97 and ord(l2[i][j]) < 97:
- temp.append("++")
- elif ord(l1[i][j]) >= 97 and ord(l2[i][j]) < 97:
- temp.append(l2[i][j])
- elif ord(l1[i][j]) < 97 and ord(l2[i][j]) >= 97:
- temp.append(l1[i][j])
- output.append(temp)
- return output
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement