Actual inspection
__author__ = ' Frank '
temp = input ("Input number:")
guess = Int (temp)
If guess = 8:
Print (' Right is 8 ')
Print ("Yea,very good,you won!")
Else
Print ("Unfortunate,you are wrong!")
Print (' Right is 8 ')
Print ("Game over!!!")
-
Zhou Haihan/Wen2010.4.11Http://blog.csdn.net/ablo_zhou
After Python 2.4, the @ symbol modifier function was added to modify the function, and the python3.0/2.6 added a modifier to the class.I now use the Python version, which supports the
Virtual EnvironmentsFirst, Python does not seem to have a project management tool like Maven/ant. What happens when there are multiple Python projects on a machine, and these Python projects have different dependencies and don't want to interfere
On the Windows platform, sometimes we want our program to run on a specified CPU, and I can see the following APIs to implement Win32process. Setprocessaffinitymask (hprocess, mask)-bind process to CPU Win32API. GetSystemInfo () [5]-Query The
This article to crawl Himalaya "the novel of the Four Kingdoms-the original reading aloud," the book as an example, demonstrates the Python crawler.
Original book Address: http://www.ximalaya.com/4228109/album/268522/
1. Enter the address we can
A recent gadget need to use the Python word process, look at the Python api,subprocess module can be implemented, and quite simple
To implement a simple self process, you need only
Import sys, OS, subprocess p = subprocess. Popen (["LS", "L"],
The contents of the Python file are as follows:
#-*-coding:cp936-*-Import OS, string, Urllib, operator# File Replacement directory pathSdir= '/usr/local/mldonkey/incoming/'# Digital Markersnum= ' 0123456789 '# Traverse directory to do
Super is used to solve multiple inheritance problems, calling the parent class directly with the class name is fine when using single inheritance, but if you use multiple inheritance, it involves finding order (MRO), repeating calls (Diamond
Python randomly generates phone numbers and numbers. The code is as follows:
# -*-coding:gbk-*-
import random
#随机产生26个手机号: Start with 13, followed by an arbitrary number between a 4~9, followed by a 8-digit random number for
_ in range (26):
Reproduced from: http://blog.sciencenet.cn/blog-579770-738240.html
In fact, the Python installation is very simple, download the installation software, all the way yes, OK on it. But to install other modules or packages, it is more cumbersome, to
' Python ' is not an internal or external command, it is not a running program or a batch file.
After I install Python in D, enter Python to display the following questions
D:\>python
' python ' is not an internal or external command, nor a
In recent days there is a net loan blacklist (http://www.p2pblack.com) site is very hot, just have to learn Python's intention, so take this site practicing, crawl the site published "Old Lai information."
Novice learning, a lot of places write bad,
In many cases you want the things on the Internet, for example, now I want to get the map poi point of Mars coordinates, random search to find this site: http://www.poi86.com
There are various coordinates of the POI point of the map of the country.
There was an error in using Pycharm compilation when you first learned that Python is ready to learn a reptile
This is the source code:
#!usr/bin/python
import urllib.request
url = "http://www.baidu.com" Get
= Urllib.request.urlopen (URL). Read (
Recently, the leader asked, "Python is very hot lately, do you see what we can do with it to do data analysis work?" and then replied, "Very hot." Hype just, a year ago the fire don't don't want Ruby now how rarely listen to people mentioned, there
information that needs to be crawled
URL: http://bj.xiaozhu.com/Crawl information:Crawl 300 listings on the page, including title, address, daily rent, the first listing pictures link, landlord picture link, landlord sex, landlord nameCode
From BS4
I believe a lot of friends who learn to use Python want to package Python programs into an EXE file, which avoids the need to install the Python runtime environment when the program is published. There are many programs that can help us do this,
in this paper, we implement a text cloud diagram of arbitrary graphs using Python
modules to useThe text cloud requires two modules: Jieba and Wordcloud, which can be installed by using the Pip method:
Pip Install Jieba/wordcloud
When you install
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