Q:

Can't break out from while loop

I am an absolute beginner in python, here's the code I'm having trouble with.
So the problem is that when i press 0 the loop doesn't break
while True:
idiot = input('Continue Y/N?: ')
idiot = idiot.upper()
if idiot == ('Y'):
    print('Great')
if idiot == ('N'):
    print('okey')
if idiot == 0:
    print('exit')
    break

A:

In your case the True never changes to False which would end the loop.
Changing the last if clause to if str(idiot) == '0' will do the trick because input() always returns a str and you provided an int (0 instead of '0').
while True:
    idiot = input('Continue Y/N?: ')
    idiot = idiot.upper()
    if idiot == ('Y'):
        print('Great')
    if idiot == ('N'):
        print('okey')
    if idiot == '0':
        print('exit')
        break

Anyway
I always use while loops with a variable that contains a boolean (True / False).
With the variable TrueOrFalse I could set it to False once a condition is met.
this is how I would have done it:
TrueOrFalse = True
while TrueOrFalse:
    idiot = input('Continue Y/N?: ')
    idiot = idiot.upper()
    if idiot == ('Y'):
        print('Great')
    if idiot == ('N'):
        print('okey')
    if idiot == '0':
        TrueOrFalse = False
        print('exit')

One more thing: I know this is just an example but your input() is only asking for 'Y' or 'N' and '0' is missing. Anyway I guess the 'N' should do (exit the loop) what the '0' is doing now.

