Message from Python discussions

December 2018

— Hmm, maybe Google search: Python kivi video tutorials.

— 

Phani Datta Reddy:
Guys I'm very much interested to learn Python.... Could you please suggest me the best websites to learn Python coding

— Https://automatetheboringstuff.com/

— Yeah... I also want to know the which websites /video's recommend for us To learn python

— Https://www.youtube.com/playlist?list=PL0-84-yl1fUnRuXGFe_F7qSH1LEnn9LkW

— Hey

— .:
.:
hello.... I'm quite new to python, I have a serious problem in extracting data from a txt file. Please assist.

I have a txt file with 10 columns and nearly 1000 raws, separated by space.

each raw is a value for variables a1, a2,...., a10 which we want to use in a loop.

I'm looking for a simple code that read each line, and assigns each value to the respective variables so that I can store it in a list.

I have read many tutorials and can't do this. This is essentially simple, can anyone please help? what I'm doing now is that I split the text file into many text files each containing just one column and using the following code


>>> xx=[]
with open (filename.txt) as f:
lines =f.read().splitlines
for line in lines :
xx.append(line) <<<

Can anyone tell me an easier command to do the same, without manually splitting the txt file?

Message permanent page

— Stop spamming your question

— Read the Rules

— We read you the first time

— Im sorry... i deleted the other, i just got error messge saying to put backticks.

— Why don't you read the rules