Hey Everyone,
After some brainstorming and help from anbu23 i was able to make it work. However instead of words i get letters seperated like this . I tought of using rstrip on line however that didint solve the problem. I get results like this :
['A', 'd', 'r', 'e', 's', '\t', '\t', ':', ' ', 'S', 'U', 'L', 'T', 'A', 'N', ' ', 'M', 'U', 'R', 'A', 'T', ' ', 'M', 'A', 'H', '.', ' ', '2', '.', 'Å', 'ž', 'E', 'N', ' ', 'S', 'K', '.', ' ', 'N', 'O', ':', '4', ' ', 'Ä', '°', 'Ã', '‡', ' ', 'K', 'A', 'P', 'I', ' ', 'N', 'O', ':', '3', ' ', ' ', ' ', 'K', 'Ã', 'œ', 'Ã', '‡', 'Ã', 'œ', 'K', 'Ã', '‡', 'E', 'K', 'M', 'E', 'C', 'E', '/', 'Ä', '°', 'S', 'T', 'A', 'N', 'B', 'U', 'L']
From this code my aim as of now is getting info from a text file than find the columns that start with adres(or name) , than get each word from this line to a list.
Later also not included in this code i aim to paste this info to pre written word documents so when user gives raw info , program will find the reqired info like adres etc than paste word documents filled with info automatically saving lots of time for me. Any direction or suggestions for this is also vey appreciated.
After some brainstorming and help from anbu23 i was able to make it work. However instead of words i get letters seperated like this . I tought of using rstrip on line however that didint solve the problem. I get results like this :
['A', 'd', 'r', 'e', 's', '\t', '\t', ':', ' ', 'S', 'U', 'L', 'T', 'A', 'N', ' ', 'M', 'U', 'R', 'A', 'T', ' ', 'M', 'A', 'H', '.', ' ', '2', '.', 'Å', 'ž', 'E', 'N', ' ', 'S', 'K', '.', ' ', 'N', 'O', ':', '4', ' ', 'Ä', '°', 'Ã', '‡', ' ', 'K', 'A', 'P', 'I', ' ', 'N', 'O', ':', '3', ' ', ' ', ' ', 'K', 'Ã', 'œ', 'Ã', '‡', 'Ã', 'œ', 'K', 'Ã', '‡', 'E', 'K', 'M', 'E', 'C', 'E', '/', 'Ä', '°', 'S', 'T', 'A', 'N', 'B', 'U', 'L']
From this code my aim as of now is getting info from a text file than find the columns that start with adres(or name) , than get each word from this line to a list.
Later also not included in this code i aim to paste this info to pre written word documents so when user gives raw info , program will find the reqired info like adres etc than paste word documents filled with info automatically saving lots of time for me. Any direction or suggestions for this is also vey appreciated.
fhand2=open("arb1.txt") adressatırı=[] for line2 in fhand2: satırsayısı2=satırsayısı2+1 if satırsayısı2==isimsatırlistesi[0]: line2=line2.rstrip()#[b]thatdoesnt disappear the gaps also why does the list takes letters instead[/b] for word in line2: adressatırı.append(word) satırdakikelimesayısı=len(adressatırı) print(adressatırı[:satırdakikelimesayısı]) print(isimsatırlistesi[0]) print("isimlerin bulunduğu satırlar ",isimsatırlistesi) print("toplam satırsayısı ise ",satırsayısı)