I've found the same as you - pasting code from anywhere to a Python application comes with a risk. This risk is however not too different from other languages where you wouldn't want mixed spaces and tabs in your code either. In my opinion, Python just enforces good coding style. You might have been as the error messages I get is rather verbose telling me the linenumber with an exception "IndentationError: unexpected indent" or "IndentationError: unindent does not match any outer indentation level". The first is for wrong identation level and the second is for mixed tabs and spaces.
Anyways - to mitigate the risk of misaligned code. The usual thing is that the wrong type of indentation is used. I use sublime text and in that editor there's a button where I can convert tabs to spaces and vice versa. The other thing is that of misaligned code with your existing code. You can usually get some plugins that handle this for you. In Python I use the Anaconda-plugin with the 'Auto format' feature which aligns in accordance to the PEP-8 standard.
Anyways - to mitigate the risk of misaligned code. The usual thing is that the wrong type of indentation is used. I use sublime text and in that editor there's a button where I can convert tabs to spaces and vice versa. The other thing is that of misaligned code with your existing code. You can usually get some plugins that handle this for you. In Python I use the Anaconda-plugin with the 'Auto format' feature which aligns in accordance to the PEP-8 standard.