If you like the video, share it with your friends on these social sites:

 

Title: Python Programming Tutorial - 42 - Reading and Writing

Added: Apr 28, 2009

Author: thenewboston

Duration: 5:23

Description:
Part 43 - http://www.youtube.com/watch?v=1_kGbLoY63QHow to read and write stuff into your files

Related Videos:

Videos related to 'Python Programming Tutorial - 42 - Reading and Writing'

Channel: Howto

Tags: python  learn  program  variable  technology  health  arts  crafts  beauty  methods  objects  tut  operators  function  oo 



python  learn  program  variable  technology  health  arts  crafts  beauty  methods  objects  tut  operators  function  oo 

Youtube Comments: 50

jorankk Says:

Jul 28, 2010 - can you read dll or exe files without getting difficult code like x00 x01 ect. ????

Myrslokstok Says:

Aug 21, 2010 - What about changing some positions on each line. Like position 6-10 to ABCDE.Would be usefull.Thanks for great tutorials.

CopperHeart0718 Says:

Nov 26, 2010 - Let's go head!:)

Rroundabout Says:

Jan 5, 2011 - breaky u lie :( u always say this "\" doesnt mean anything but i dont believe u :)

ShadeRunners Says:

Jan 24, 2011 - Instead of readline, which reads line for line, readlines reads line by line, each line, into a list. So instead of just returning the lines, line, line, line at a time. It takes all the lines and returns them line by line but it does it as a list. Or something along that line. ROFL

Gmez1407 Says:

Mar 17, 2011 - Correct me if im wrong but is is possible to use fob to open any file or another program such as the command prompt like is you put fob('c:/cmd.bat')

PurpleSpawner85 Says:

Mar 29, 2011 - haha i doubt it but very good question tell me if you figure it out.

joaoris Says:

Apr 2, 2011 - If you want to let the user input text for the file,use this:text=raw_input("Write text for file here: ") fob.write(text.replace("\\n", "\n"))

onon6 Says:

Apr 28, 2011 - >>> fob.readlines()['lineone\n', 'linetwo\n', 'linethree']>>> fob.read(25)''>>> fob.read(5)''>>> fob.readlines()[]>>>great job Python, suddenly my lines disappear, but not in the .txt folder

AJALA1999 Says:

Jun 2, 2011 - hi newboston your tutorials are really good but i would like to know if you have a tutorial to open edit and close CSV files using python that would be great!!

AJALA1999 Says:

Jun 2, 2011 - hi newboston your tutorials are really good but i would like to know if you have a tutorial to open edit and close CSV files using python that would be great!!!

AJALA1999 Says:

Jun 2, 2011 - do yo have a tutorial to open edit and close CSV file with python?

AJALA1999 Says:

Jun 2, 2011 - Hello, I'm very new to python and programming in general. Basically what I need to do is take a csv, look at the first row and if it says something (say 'D'), then read the contents of the colum. Then I want to copy the rows that contain a certain value (say all rows that have '0' in column 'D'). From this I want to construct a new csv that has all of the rows with the same value for column D.A,B,C,D1,X,3,02,Y,2,13,Z,1,0So from this I want:A,B,C,D1,X,3,03,Z,1,0...etc

Kamilk12l Says:

Aug 22, 2011 - lol he always hits that forward slash \ key

KenjiChen1 Says:

Aug 22, 2011 - The best python tutorial I have ever seen, make learning happy and easy.Hope this series will keep going and introduce more advanced features.Keep Moving , buddy. We all love it !!!!

m33taphor Says:

Sep 1, 2011 - If anyone here is a Python Coding Legend please message me :)

ThePokemonteacher Says:

Nov 4, 2011 - that's me

Colstonewall Says:

Nov 22, 2011 - You might want to join the Python Tutor Mailing List to get help like this. They will answer just about any Python question (as long as you've tried to figure out the answer yourself). Very nice people. And of course anyone on the list can help you, but they have mods who always answer your questions too.

Cantinflat Says:

Dec 10, 2011 - pure and simple, you are the best bucky!

supersushi269 Says:

Jan 16, 2012 - Which python coding legend would watch beginner tutorials? Yeah, all n00bs here! Including me! :P

vimmy2492 Says:

Feb 3, 2012 - hey typed the backslash exactly 3 times throughout the entire series

a90380 Says:

Feb 28, 2012 - I couldn't see the text file that he added the 4 lines to, but whatever.

jackypentax Says:

Apr 25, 2012 - May I know why we don't add '\n' at the end of the last line when we write new lines into a file? Thanks for your tips.

jackypentax Says:

Apr 25, 2012 - May I know how to read a specific line only? I try "print fob.readline(3)" but it won't read the third line only. Thanks for your tips.

rabaduej Says:

May 16, 2012 - I read all the lines into a list, then used the list element. set myList = to fob.readlines()then get the 3rd line by using myList(2) - 0, 1, 2

Shopping | prank calls | Wholesale products | english movies | prank calls | proxy | links | prank call

Topfacebookvideos funny arabic videos

Privacy Policy