Advertisement
biswasrohit20

task2

May 17th, 2021
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. def upperSwitch(l1,l2):
  2. l = len(l1)
  3. output = []
  4. for i in range(l):
  5. temp = []
  6. for j in range(l):
  7. if ord(l1[i][j]) >= 97 and ord(l2[i][j]) >= 97:
  8. temp.append("**")
  9. elif ord(l1[i][j]) < 97 and ord(l2[i][j]) < 97:
  10. temp.append("++")
  11. elif ord(l1[i][j]) >= 97 and ord(l2[i][j]) < 97:
  12. temp.append(l2[i][j])
  13. elif ord(l1[i][j]) < 97 and ord(l2[i][j]) >= 97:
  14. temp.append(l1[i][j])
  15. output.append(temp)
  16.  
  17. return output
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement