Encrypt a String in Python

I have quite a handsome hand-on experience in python programming and now i am trying to work on blockchain domain. 

Have read about the various libraries related to encryption and decryption of string in python, i was looking for some demo piece of code, that i can go through to understand the basic of encryption to take my tasks forward.

It will be really helpful, if some one can help me scratch a basic layout for string encryption in python.

Thanks in advance.