python read text file variables code example
Example 1: how to get variabels from text file
#python stuff over here
getVarFromFile(filename) #this is the function that im looking for
print var_b
#output: car, as string
print var_c
#output 15.5, as number.
Example 2: python load a txt file and assign a variable
with open('your_text_file.txt', 'r') as f:
username = f.readline()
password = f.readline()