fork download
  1. a = "11001100"
  2. b = "01101100"
  3.  
  4. def p_and(a,b):
  5. aux=[]
  6. for i in range(8):
  7. aux.append(int(a[i]) and int(b[i]))
  8. return aux
  9.  
  10. print (p_and(a,b))
  11.  
  12. #https://pt.stackoverflow.com/q/421873/101
Success #stdin #stdout 0.02s 9444KB
stdin
Standard input is empty
stdout
[0, 1, 0, 0, 1, 1, 0, 0]