from time import time

time()
1670885602.4357347
from turtle import *
oogway = Turtle()
from math import ceil

ceil(10.4)
11
import random

def coinflip():
    roi = random.randrange(2)
    if roi == 0: print("tails")
    else: print("heads")

coinflip()
heads
i = 0
deck = []
hand = [['clubs', 'ace'], ['clubs', 'jack'], ['clubs', 'queen'], ['clubs', 'king'], ['clubs', '10']]
flush = ['10', 'jack', 'queen', 'king', 'ace']
r = False
o = False
y = False
a = False
l = False
f = False
for n in ["hearts", "clubs", "spades", "diamonds"]:
    for c in ["ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "jack", "queen", "king"]:
        deck.append([n, c])

print(deck)
print(len(deck))
#while i < 5:
#    t = random.randrange(len(deck))
#    hand.append(deck[t])
#    i += 1
print(hand)
for n, c in hand:
    for j in flush:
        if c == j:  # something wrong right here
            if r == True:
                if o == True:
                    if y == True:
                        if a == True:
                            l = True
                        else:
                            a = True
                    else:
                        y = True
                else:
                    o = True
            else:
                r == True
    if hand[0][0] == hand[1][0] and hand[2][0] and hand[3][0] and hand[4][0]:
        f = True
if r and o and y and a and l and f:
    print("royal flush")
print(r)
print(o)
print(y)
print(a)
print(l)
print(f)
[['hearts', 'ace'], ['hearts', '2'], ['hearts', '3'], ['hearts', '4'], ['hearts', '5'], ['hearts', '6'], ['hearts', '7'], ['hearts', '8'], ['hearts', '9'], ['hearts', '10'], ['hearts', 'jack'], ['hearts', 'queen'], ['hearts', 'king'], ['clubs', 'ace'], ['clubs', '2'], ['clubs', '3'], ['clubs', '4'], ['clubs', '5'], ['clubs', '6'], ['clubs', '7'], ['clubs', '8'], ['clubs', '9'], ['clubs', '10'], ['clubs', 'jack'], ['clubs', 'queen'], ['clubs', 'king'], ['spades', 'ace'], ['spades', '2'], ['spades', '3'], ['spades', '4'], ['spades', '5'], ['spades', '6'], ['spades', '7'], ['spades', '8'], ['spades', '9'], ['spades', '10'], ['spades', 'jack'], ['spades', 'queen'], ['spades', 'king'], ['diamonds', 'ace'], ['diamonds', '2'], ['diamonds', '3'], ['diamonds', '4'], ['diamonds', '5'], ['diamonds', '6'], ['diamonds', '7'], ['diamonds', '8'], ['diamonds', '9'], ['diamonds', '10'], ['diamonds', 'jack'], ['diamonds', 'queen'], ['diamonds', 'king']]
52
[['clubs', 'ace'], ['clubs', 'jack'], ['clubs', 'queen'], ['clubs', 'king'], ['clubs', '10']]
False
False
False
False
False
True

Something went wrong in the code above and I don't know what. In the area that I marked above, it's supposed to compare the hand to a royal flush, and if their the same, it changes a variable from false to true. I made the hand a royal flush to test if it works. Some sort of error happens when it's comparing the hand and a royal flush and it never changes the variables to true. There's some hinted code that I made a hint so that it wouldn't interfere with my tests, the code makes the hand random.