http://blog.csdn.net/pipisorry/article/details/45830941Collection Library CollectionSome special use cases, counter are very practical in some situations. If you've been in this year's Facebook Hackercup, you can even find out what's practical
Manasa and Stones, manasaandstones
1 from _ future _ import print_function 2 3 4 def main (): 5 t = int (raw_input () 6 for _ in range (t ): 7 n = int (raw_input () 8 a = int (raw_input () 9 B = int (raw_input () 10 possible_value = [] 11 for _ in
Taum and B 'day, taumandday
// Yourself
1 def main(): 2 t = int(raw_input()) 3 for _ in range(t): 4 units = 0 5 b, w = map(int, raw_input().strip().split(' ')) 6 x, y, z = map(int, raw_input().strip().split(' ')) 7
Sherlock and Squares, sherlocksquares
// Link
Https://www.hackerrank.com/challenges/sherlock-and-squares
1 from math import sqrt # What to use, what to introduce, reduce waste and error possibilities 2 3 4 def main (): 5 t = int (raw_input ()) 6
Python basic tutorial Reading Notes (2) Chapter 2 list and metadata, python basic tutorial
2.1 Sequence Overview
The main difference between a list and a group is that a list can be modified, but a list cannot be modified. That is to say, if you
Sherlock and GCD, sherlockandgcd
1 import fractions, functools, sys 2 3 4 if _ name _ = '_ main _': 5 T = int (sys. stdin. readline () 6 7 for _ in range (T): 8 N = int (sys. stdin. readline () 9 A = list (map (int, sys. stdin. readline (). split ()
Max Min, maxmin
1 def main (): 2 n = int (raw_input () 3 k = int (raw_input () 4 5 k_arr = [] 6 min_dif = 9999999999 # according to the input requirements, specify a maximum value of 7 8 for _ in xrange (n): 9 k_arr.append (int (raw_input () 10 11
List, Tuple, Dic, Set, and pythontuple in Python
List, Tuple, Dic, Set in PythonList Definition
Sequence is the most basic data structure in Python. Each element in the sequence is assigned a number-its location, or index. The first index is 0, the
Python Tips (occasionally updated), pythontipsDictionary sort
1. sort by key and forward
1 sorted (dic. items (), key = lambda d: d [0])
2. sort by value and Reverse Order
Sorted (dic. items (), key = lambda d: d [1], reverse = True)
3. After
[Python learning] downloading the source CSDN file in a browser and backing up the file in PDF FormatRecently I suddenly wanted to back up my blog and read two software: one is the CSDN blog export software, which seems to be unavailable now; the
Python mail bombing (1)
For learning purposes, do not use it for other illegal activities.
Import smtplibImport timeFrom email. mime. text import MIMETextEnter the email address you want to bomb
Mail_to = "xxxx@126.com"Def send_email (tolist,
Python simple base sorting algorithm, python base algorithm
This article describes python's simple implementation of the base sorting algorithm. Share it with you for your reference. The specific implementation method is as follows:
From random
Example Analysis of base64 encryption and decryption methods in python, pythonbase64
This document describes the base64 encryption and decryption methods in python. Share it with you for your reference. The specific analysis is as follows:
I. base64
Python traverses the database and obtains the key value.
Traverse the Redis database with keys stored in key-value mode in the format of PREFIX _ * and print their values.
SCAN is used for traversal, because keys prefix _ * may cause Redis to block
Introduction to the hypot () method in Python, pythonhypot
The euclidean norm sqrt (x * x + y * y) returned by the hypot () method ).Syntax
The syntax of the hypot () method is as follows:
Hypot (x, y)
Note: This function cannot be directly
Describes how to use the find () method in Python, pythonfind
The find () method is used to determine the str string. If the start index beg and end index can be found in a string or a substring of a string.Syntax
The syntax of the find () method
Use of the isalpha () method for processing strings in Python, pythonisalpha
The isalpha () method checks whether a string is composed of only letters.Syntax
The syntax of the islpha () method is as follows:
Str. isalpha ()
Parameters
NA
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