datetime and Date use similar1 Importdatetime2 Print(Datetime.datetime.today ())#current time, to milliseconds, datetime type 2018-01-23 21:55:43.7569483now = Datetime.datetime.now ()#as with today (), the datetime type4 Print(now)#2018-01-23 21:55:4
Reprint: Https://stackoverflow.com/questions/419163/what-does-if-name-main-doWhen your script was run by passing it as a command to the Python interpreter,Python myscript.pyAll of the of the Code was at indentation level 0 gets executed. Functions
Python IntroductionThe founder of Python is Guido van Rossum (Guido van Rossum). 1989 Christmas period, Guido van Rossum (Chinese name: Uncle Turtle) in order to pass time in Amsterdam, determined to develop a new script interpreter, as an
First import scipy package from scipy.io import loadmatThen read m = Loadmat ("f:/__identity/activity/paper/data/d001.mat")Notice here that M is a DICT data structure>>>m{'__header__': b'MATLAB 5.0 mat-file, Platform:pcwin, Created on:mon -22:16:43
@property can access a Python-defined function as a property, providing a more friendly way to access it, but sometimes setter/getter is needed.classpeople:def __init__(self,name,weight,height): Self.__name=name Self.weight=Weight Self.height=Height
(from the small turtle 0 Basic Beginner Learning python)To learn python, you can go through the contents of the Rookie tutorial: http://www.runoob.com/python3/python3-basic-syntax.htmlIf you want to know how many built-in functions (BIF) Python has,
Import pandas as pddef getempdataframe (num): ' Create a reusable data with a certain randomness and authenticity ' #员工编号 emp = ["] * num lennum = len (num)) for i in range (num): emp[i] = str (i+1). Zfill
#_*_ encoding:utf-8 _*_ImportJSONImportRequests#POST RequestPayload = {"Cindy":"Hello World", "python":"1078370383"}r= Requests.post ('Http://httpbin.org/post', Data=payload)Print(R.text)#output, data data transfer to form# {#"args": {},#"
Learning route Some places do not follow the order, some places forget not to write, after the opportunity will slowly fill up, projects, etc. I concluded will also upload, thank youQuery DirectoryOne, hardware 11, databaseSecond, Linux basic 12,
#_*_ encoding:utf-8 _*_ImportRequests#Request a blog home, no parameter GET requestR = Requests.get ('http://www.cnblogs.com/cindy-cindy/')Print(R.status_code)Print(R.text)#Search for content in the blog park, get requests with parametersPar =
1. Time# 1, Format good time 2018-1-14-16:42# 2, timestamp is the number of seconds from UNIX to now# 3, Time tuple# If you want to convert time stamps and formatted time to each other, you must first turn to a time tuple before you can turn1 #Print
Python Learning Website recommendation, python website recommendation
Site B is the best free Python learning website I have ever seen.
Dark Horse programmer-
Https://space.bilibili.com/37974444? Spm_id_from = 333.338.viewbox _ report.6 #/
Linux
Eval functions and eval Functions
Eval
Function: Evaluate a string 'str' as a valid expression and return the calculation result.
Syntax: eval (source [, globals [, locals])-> value
Parameters:
Source: Code object returned by a Python
93. re, Beautifulsoup, rebeautifulsoup
Navigate to this article:
Introduction
Basic usage
Traverse Document Tree
Search Document Tree
Summary
The re module is not described too much in the previous python advanced sections. This article is the
Google and pythongoogle
Mark the website at the beginning: goole Official Website
Programmers in any language compile code that complies with the specifications, which is the first step in their programming career.I. semicolon
Do not add points at
Crawler parsing database ----- re, beautifulsoup, pyquery,
I. Introduction
Beautiful Soup is a Python library that can extract data from HTML or XML files. it enables you to navigate, search, and modify documents by using your favorite converter.
Chapter 3 python3, python3
The python official website describes the set as follows:
Python also includes a data typeSets. A set is an unordered collection with no duplicate elements. Basic uses include membership testing and eliminating duplicate
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