Python Forum

Full Version: what will be the best way to find data in txt file?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,
I have created a "config" file for my code with all kind of data inside , for the code to run and use
the config.txt is :
IP = 10.0.0.5
user = root
pass = MyPass1
FreeData = test
what do I need to do in order to read IP\user\pass\FreeData and use it in the code ?

** will it be better to create a json file? and then get the data from it?

Thanks,
Thanks
it's great solution!