Feb-02-2020, 11:43 PM
I couldn't get this variable passed to the next function. This last bit of code is me throwing everything at it. This actually worked but strangely still gave an error message:-
Can anyone see where I'm going wrong?
Can anyone see where I'm going wrong?
def dataread(): test_file = open('Database.txt', 'r') test_lines = test_file.readlines() test_file.close() #Print line liner = (test_lines[1]) colon = liner.find(":") semi = liner.find(";") comma = liner.find(",") length = len(liner) name = (liner[colon+1:semi]) location = (liner[semi+1:comma]) gps = (liner[comma+1:length]) htmlwr(location) return location def htmlwr(location): print(location) dataread() htmlwr(location)