Learn python the hard way
- this task didn't use
%to insert the variable value into a string, but a,to insert the different values inprintfunction
- the first task to introduce
%, the formatter character, the commonly used formatters including%r%s%d, the difference between%r%sis in ex09 - ex07 introduced some high-level use of formatters
- escape sequence introduction, some I don't know how to work
- ex10extra a cool visual effect, but I don't know how it works right now
- first task to introduce
raw_input
- first task to import
argvfromsys - notice the input style when using the
argv - notice the combination of
raw_inputwithargv
- read a file,
file.read() - open a file and assign to a variable
- when use
wmode, there is no need to truncate the file after
- copying data from one file to another
- define a function,
*argsin the ex18 - read certain line in a file
- set the position in the file
- position changes while the reading goes
the 1st little game with loops and if/else loop could use in string, list, dict and so on find out a good way to judge whether the input is a number at all