Python Workbook-Topic answer reference

Source: Internet
Author: User

question No. 0000: Add the red number to the top right corner of your QQ head (or Weibo avatar)

Python Library: Everyone will say PIL, but according to StackOverflow's advice, adopt pillow (PiL a fork)
Document: Imagefont Module

question No. 0001: generate an Activation code (or coupon) for your app

    1. If you do it simply, use UUID it directly. Recommended Useuuid1
    2. You can use the random module to generate it yourself using id+

My approach: To see someone say:

The Apple Store app's Activation Code (coupon) is typically 10-bit long and consists of lowercase letters and numbers

So I am: hex(id)+rand(‘g‘-‘z‘)+rand(char) where rand (' G '-' Z ') is the delimiter.

question No. 0002 : Save 200 Activation codes (or coupons) generated by 0001 questions to the MySQL relational database

Python library: MySQLdb (can also sqlalchemy)

question No. 0003: Save the 200 activation codes (or coupons) generated by 0001 questions to the Redis non-relational database.

Python Library: Redis-py

question No. 0004: any plain text file in English, counting the number of occurrences of the word.

Segmentfault

question No. 0013: Write a program that crawls pictures with Python

Python Library: Requests, BeautifulSoup

Python Workbook-Topic answer reference

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.