Learning record 4 (8th day)

Learning record (8th day)

Start studying: Saturday, December 7th Books used: Miyuki Oshige "Details! Python3 Introductory Note ”(Sotec, 2017)

Resume from [Retrieving values from dictionary (Ch.9 / p.229)](7th day), Finished until [Text file (Ch.13 / p.316) (partially reserved)](8th day)

User-defined function

>>>def Arnold():
       return "When my muscles say "No", I say "Yes!""
>>>Arnold()
"When my muscles say "No", I say "Yes!"

・ It is also possible to set arguments -If defined first, the pass can be stated in the statement for the time being. -The function definition is a closed space, and ** variables set in the definition ** cannot be referenced from the outside. -You can set a variable value by adding * before the argument. (By convention, it is expressed as * args, etc.) -** Module is created using def function ** (Not all? However, there is a description that the def file that defines yen-dollar conversion can be imported and used, so interpret it as such) ・ You can see the explanation of the function with help () (although it is new). You can go back by pressing ** q **.

Iterator and generator

>>>muscles = ["biceps","triceps","abdominal","deltoid","gluteus"]
>>>muscles_iter = iter(muscles)
>>>next(muscles)
"biceps"
>>>next(muscles)
"triceps"
#Omission
#If there are no elements to retrieve, an error will occur at the end.

-The generator is a similar process, but it seems to have the advantage of requiring less memory. I'm not sure, but I'm optimistic that I can feel it when it's time to use it.

Class definition

on hold

text file

-Open with open (), read with read (), and close with close (). To avoid errors, it is a good rule to close the read number first before processing it. -If it is a with-as statement, there is no need to close (). (Open with open and define as) ・ When I read html with tkinter, the amount was too large and it got stuck ... It seems that if you continue reading, you can read as many as the specified number. -All if the argument of read () is blank or a negative number. If you enter a positive number, only that sentence. Or readline () -How to check if there is a save destination and a file using filedialog

Recommended Posts

Learning record 4 (8th day)
Learning record 9 (13th day)
Learning record 3 (7th day)
Learning record 5 (9th day)
Learning record 6 (10th day)
Learning record 8 (12th day)
Learning record 1 (4th day)
Learning record 7 (11th day)
Learning record 2 (6th day)
Learning record 16 (20th day)
Learning record 22 (26th day)
Learning record No. 21 (25th day)
Learning record 13 (17th day) Kaggle3
Learning record No. 10 (14th day)
Learning record 12 (16th day) Kaggle2
Learning record No. 24 (28th day)
Learning record No. 23 (27th day)
Learning record No. 25 (29th day)
Learning record No. 26 (30th day)
Learning record No. 20 (24th day)
Learning record No. 14 (18th day) Kaggle4
Learning record No. 15 (19th day) Kaggle5
Learning record 11 (15th day) Kaggle participation
Programming learning record day 2
Learning record No. 17 (21st day)
Learning record
Learning record No. 18 (22nd day)
Learning record # 3
Learning record # 1
Learning record # 2
Learning record No. 19 (23rd day)
Learning record No. 29 (33rd day)
Learning record No. 28 (32nd day)
Learning record No. 27 (31st day)
Python learning day 4
Learning record (2nd day) Scraping by #BeautifulSoup
Learning record so far
Go language learning record
Learning record (4th day) #How to get the absolute path from the relative path
Linux learning record ① Plan
Effective Python Learning Memorandum Day 15 [15/100]
<Course> Deep Learning: Day2 CNN
Effective Python Learning Memorandum Day 6 [6/100]
Effective Python Learning Memorandum Day 12 [12/100]
Effective Python Learning Memorandum Day 9 [9/100]
Effective Python Learning Memorandum Day 8 [8/100]
Rabbit Challenge Deep Learning 1Day
<Course> Deep Learning: Day1 NN
Effective Python Learning Memorandum Day 14 [14/100]
Effective Python Learning Memorandum Day 1 [1/100]
Subjects> Deep Learning: Day3 RNN
Rabbit Challenge Deep Learning 2Day
Effective Python Learning Memorandum Day 13 [13/100]
Effective Python Learning Memorandum Day 3 [3/100]
Effective Python Learning Memorandum Day 5 [5/100]
Effective Python Learning Memorandum Day 4 [4/100]
Effective Python Learning Memorandum Day 7 [7/100]
Effective Python Learning Memorandum Day 2 [2/100]
Learning record (3rd day) #CSS selector description method #BeautifulSoup scraping
Learning record (6th day) #Set type #Dictionary type #Mutual conversion of list tuple set #ndarray type #Pandas (DataFrame type)
Thoroughly study Deep Learning [DW Day 0]