Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to make a config txt file on python

#No library mode
file = open("abc.txt", 'r')
content = file.read()
paths = content.split("
") 
for x in xs:
    print x.split(" = ")[1]
    
x_list = []
x_dict = {}
for path in paths:
    p = path.split(" = ")
    path_list.append(p)[1]
    path_dict[p[0]] = p[1]
Comment

PREVIOUS NEXT
Code Example
Python :: python check if dictionary empty 
Python :: fromhex python 2.7 
Python :: how to multiply two lists in python 
Python :: re mobile no validate python 
Python :: open tkinter and cli 
Python :: tkinter mouse loading cursor 
Python :: pybind11 python37_d.dll access violation 
Python :: crop image using opencv with height and width 
Python :: stellargraph python 
Python :: nlargest of each group 
Python :: QuizListView login required django 
Python :: pbcopy stands for 
Python :: Extract all bounding boxes using OpenCV Python 
Python :: least square fit straight line python 
Python :: how to get rid of an instance variable python 
Python :: python redirect console output to devnull 
Python :: Python Record live streams (TS FILES) 
Python :: pd datetime 
Python :: if python 
Python :: tkinter call function in mainloop 
Python :: concat series to dataframe 
Python :: pandas integer to date 
Python :: python / vs // 
Python :: add key to dictionary python 
Python :: how to import a module from a different directory in python 
Python :: Tree: Inorder Traversal 
Python :: how to use loop in python 
Python :: camel case to snake case python 
Python :: how to send a command to cmd using python 
Python :: create login user django command 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =