On 2018年05月25日, asa32sd23 at gmail.com <asa32sd23 at gmail.com> wrote: > here is the code, i keep getting an error, "break outside loop". You get the "break outside loop" error because you're using the break statement when you are not inside a loop. > if it is false just exit function You use the 'return' statement to exit a function. > def d(idx): > if type(idx) != int: > break >> d('k')