On 2018-07-23, no@none.invalid <no@none.invalid> wrote:
> never mind.
> x = range (5)
> y = range (5)
> for ply in x:
>
>     for com in y:
>         if ply==com:
>             result="Tie"
>
>         print(ply,com,result)
>         result = ""

Something like this is possible. "x", "y" and "result" can be
unecessary.

for ply in range(5):
    for com in range(5):
        print(ply, com, end='')
        if ply == com:
            print(" Tie")
        else:
            print()

-- 
Neil Cerutti

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to