How to export your private keys from Electrum desktop wallet
In this post, I'm going to show you how you can export your private keys from Electrum desktop wallet. If you're interested in doing the same thing with the mobile version, you can check this article.
So to start, launch your wallet then head to the "addresses" tab, choose the address that you want to export its private key, right-click it, and select -> Private key as shown in the picture below.

You will then be asked to type your password (assuming your wallet is encrypted). Do that.
A window should then show both your address and its private key:

That's it. You can now import, sweep or print your private key.
Now, if you're interested in exporting the private keys for all of our addresses, and not just one, you can do that by going to the Menu -> Wallet -> Private keys -> Export:

Type your password if you're asked to. A window will then appear with a list of your addresses along with the private keys (wait a bit, it might take a couple of seconds)

And you're done. You can then copy them, or export them as CSV or JSON.