'Python encrypt code from particular line until the end

I want to encrypt a code from a particular line until a line in python 3.x . The reason I am requesting it in this manner because my code has to get user input form in that same code.

example of code will be like this name: something place: Germany age: 20

####variables end here###

codes start from here: print(name) print(place) print(age)

so what I wanted is the codes to be encrypted/obfuscated or unreadable to users. The only exception is the variables that has to be readable to user.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source