The Soul That You Bring To The Table

The Soul That You Bring To The Table

"Margaret" by Lana del Rey ft. Bleachers is one of the best songs ever. It's such a curveball omg. I like to be a curveball too. I like to bring the unexpected to everything that I do. 

For that is just me; I am unexpected. I like to throw curveballs. Nobody ever sees things coming with me.

two pylons connected by wires
Just some random pylons...

Modules

I did a lesson on modules. It was great. Nearly all of it rolled over from my background in working as a software engineer. Yes!!! For the first time on this blog I am saying that. Even though it has been my job for a while.

I skipped the video on datetimes because I hate videos. They are boring and not accessible to me. I also skipped a tutorial on pipenv which I may have to go back to at some point. pipenv? What is that? Thank you. 

Dictionaries

I can't say too much about them because I am learning so fast. I have made a LinkedIn post about them anyway.

I learned a lot of interesting things about them overall anyway,

Files

So I learned something cool like this today:

.readlines()

Okay. I learned about the .readlines() function. Yes. Yes. Yes. Thank you. And goodbye.

Its purpose is to "read a text file line by line instead of having the whole thing". ???!?

.readline()

Will just read one single line at a time

Writing a file

with open("randm_file.txt", "w") as write_file:
    write_file.write("Oh cool, look. at me! I wrote. a file!")

The "w" argument is an optional second parameter in open()

The default is "r" or read. I'm guessing that "w" means write.

THE CODE CREATES A NEW FILE IN THE SAME FOLDER AS THE ORIGINAL FILE AND GIVES IT WHATEVER TEXT WE INPUT IT AS.

That's so cool - I tried it out and it works. This is so so so amazing. Thank you!!! 

Appending a file

'a' for 'append' is another argument in the open() method.

Comments

Popular posts from this blog

Hello World

Yosemite

Two Lines of Thought, Makes Me Wonder What I'm Missing