Cookouts:
- Thinking, Writing and Reading code everyday.
- Read code backward.
- Focus on details.
- Write comments.
- Write down mistakes you had mad, read it before next code.
- A Best VPN
https://www.expressvpn.xyz?referrer_id=9482250&utm_campaign=referrals&utm_medium=copy_link&utm_source=referral_dashboard
Exercise 1
http://stackoverflow.com/questions/3249524/print-in-one-line-dynamically
http://stackoverflow.com/questions/5087425/python-difference-between-using-and
# -*- coding: utf-8 -*-
Put it at the top of the code will fix the ASCII encodings error.
Exercise 2
It can be wrong when you use chinese characters in comment.
Exercise 5
http://stackoverflow.com/questions/15170349/whats-the-difference-between-r-s-and-d-in-python
http://stackoverflow.com/questions/6005159/when-to-use-r-instead-of-s-in-python
http://stackoverflow.com/questions/4480278/list-of-python-format-characters
http://stackoverflow.com/questions/56820/round-in-python-doesnt-seem-to-be-rounding-properly
Exercise 6
# New way to use format characters
judge = True
court = "Is he guilty?! %r"
print court % judge
http://stackoverflow.com/questions/10043636/any-reason-not-to-use-to-concatenate-two-strings
http://stackoverflow.com/questions/34626470/why-does-plus-can-concatenate-two-strings-in-python
Exercise 8
http://stackoverflow.com/questions/36144557/how-can-i-nest-format-string-in-python2
Exercise 9
http://stackoverflow.com/questions/34634532/what-happened-with-formatter-r-and-n-in-python
Exercise 10
http://stackoverflow.com/questions/16076775/python-escape-sequence-nname-not-working-as-per-definition
while True:
for i in ['/', '-','|', '\\', '|']:
print '%s\r' % i,
http://stackoverflow.com/questions/3329775/what-does-this-stand-for
http://stackoverflow.com/questions/26184100/how-does-v-differ-from-x0b-or-x0c
\a ASCII Bell (BEL)
\b ASCII Backspace (BS)
\uxxxx Character with 16-bit hex value xxxx(Unicode only)
\Uxxxxxxxx Character with 32-bit hex value xxxxxxxx (Unicode only)
\ooo Character with octal value ooo
\xhh Character with hex value hh
http://stackoverflow.com/questions/2672326/what-does-a-leading-x-mean-in-a-python-string-xaa
Exercise 11
http://stackoverflow.com/questions/5563089/raw-input-function-in-python
Exercise 12
https://docs.python.org/2/library/pydoc.html#module-pydoc
Exercise 13
http://stackoverflow.com/questions/25675223/how-to-use-raw-input-with-argv/36156982#36156982
Exercise 16
http://stackoverflow.com/questions/16208206/confused-by-python-file-mode-w
http://stackoverflow.com/questions/21019942/write-multiple-lines-in-a-file-in-python