Color=raw_input ("Enter your favorite color:") if color = = "Red" or color = = "Green" or color = = "BLACK": print "you Can play this game. " Else:print "Sorry, you can ' t play the game."#开始不明白为什么 = = After the color must take "", and the
If a string contains many characters that need to be escaped, it can be cumbersome to escape each character. To avoid this, we can prefix the string to r indicate that it is a raw string, and that the characters inside it do not need to be escaped.
1. The regular expression base 1.1. Simple IntroductionRegular expressions are not part of Python. Regular expressions are powerful tools for working with strings, with their own unique syntax and an independent processing engine, which may not be
Many beginners just start to learn python often see python in __name__ = \ ' __main__\ ' such code, may be a lot of novice start learning at the time are more confused, python __name__ = ' __main__ ' role, What are you doing?There is a phrase that
Debug Tips:Reprint please declare this article citation source: Look at Daniel's small fresh1. In the first programming, the else is written after each if, so that if your else is not supposed to run, then you can output the state information at
#!/usr/bin/env python #-*-Coding:utf8-*- age = $ for I in range (3): intput = int (input ("Guess my Ages:"))
if Intput Old: print ("Input too large, please re-enter") elif intput = : Print ("Answer right, game out")
---restore content starts---ebook MarquisFirst Chapter: why python?What can 1.1 python do?1. Easy to get started2. Powerful Features3. A lot of things to do: Web site backend programmers, automated operations, data analysts, game developers,
A Third-party library is installed first using the requests module-constructed Downloader requestsPIP Install requests1 classstrongdownload (object):2 3 def __init__(self):4 #Get Agent IPList .5Self.iplist = ['Find your own
Set of initial basic data types and for loop, set of data typesSet of initial basic data types and for Loop
-- Daoxin# Intercepting list elements
>>> Name_list = ['daoxin', 'wuxin']>>> Name_list [0]'Daoxin'>>> Name_list [1]'Wuxin'>>> Name_list
Python Day 1-getting started with Python (1) data definition, python Day 1
Data Type:
What is data?
In computer science, data refers to the general term of all the symbols that can be input to a computer and processed by a computer program. It is
Some research results on writing GUI desktop applications in python, pythongui
I studied the solution for developing GUI desktop applications using python. The results are as follows:
EasyGui: The control is extremely simple. It does not even have
Role of _ name _ = '_ main _' in python, __name ___ main __
Many new users often see code like _ name _ = \ '_ main __\' in python when learning python, many new users may be confused at the beginning. What is the role of _ name _ = '_ main _' in
Use the sort () method in Python.
I. Basic Form
sorted(iterable[, cmp[, key[, reverse]]])iterable.sort(cmp[, key[, reverse]])
Parameter description:
(1) iterable specifies the list or iterable to be sorted. Needless to say;
(2) cmp is a function
The path to python: wupeiqi
1. Install Python 2 and Python 3 in windows.
Download Python2 and Python3Https://www.python.org/downloads/
Install two versions respectively
Bytes
Add Environment Variables
After Python3 is installed, it is added to the
Detailed explanation of python Development Environment establishment, detailed explanation of python Establishment
Although there are a lot of articles on the Internet to build a python development environment, it is still necessary to record the
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