- Code: Select all
`print("p q r")`

for p in [0,1]:

for q in [0,1]:

for r in [0,1]:

print(p,q,r)

So I have to create the output:

p q r

T T T

T T F

T F T

T F F

F T T

F T F

F F T

F F F

So basically the 0 has to be a "T" and the 1 has to be a "F"

How would I modify my code to do this? Thanks