Feb-21-2020, 04:26 AM
(This post was last modified: Feb-21-2020, 04:33 AM by shreyaspadhye3011.)
''.join([str((int(c) ^ 1)) for c in "00111100"])
This should do it
Find the complement of a number
|
Feb-21-2020, 04:26 AM
(This post was last modified: Feb-21-2020, 04:33 AM by shreyaspadhye3011.)
''.join([str((int(c) ^ 1)) for c in "00111100"]) This should do it |
|
Messages In This Thread |
Find the complement of a number - by landlord1984 - Jan-19-2017, 07:50 AM
RE: Find the complement of a number - by Aquaplant - Jan-19-2017, 01:42 PM
RE: Find the complement of a number - by landlord1984 - Jan-20-2017, 03:51 AM
RE: Find the complement of a number - by wavic - Jan-20-2017, 07:44 AM
RE: Find the complement of a number - by shreyaspadhye3011 - Feb-21-2020, 04:26 AM
|