- Learning Python for Forensics
- Preston Miller Chapin Bryce
- 260字
- 2021-07-02 16:41:07
Conventions
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code, variables, function names, URLs, or other keywords are written in a specific font, for example
. Variables are lower case with underscores separating words. Functions or class names are follow the CamelCase convention (for example, processData
) where the first word is lowercase and any following word is capitalized. Function, method, or class names will also by followed by a pair of parenthesis to logically separate them from variables. We will display all code meant for the Python interactive prompt or in a file.
A block code written in the interactive prompt is preceded by three ">" or "." symbols emulating what a user would see when typing the data into the interactive prompt.
Python Interactive Prompt Code >>> a = 5 >>> b = 7 >>> print a + b 13
A block of code written in a file will contain a line number on the left side of the file followed by the code on that line. Indentation is important in Python and all indents should be at increments of 4 spaces. Lines may wrap due to margin lengths. Please refer to the provided code for clarification on indentations and layout.
Python Script 001 def main(): 002 a = 5 003 b = 7 004 print a + b
- Getting Started with Gulp(Second Edition)
- Pandas Cookbook
- Web交互界面設計與制作(微課版)
- Hadoop+Spark大數據分析實戰
- Building a Recommendation Engine with Scala
- QGIS:Becoming a GIS Power User
- 數據結構案例教程(C/C++版)
- 蘋果的產品設計之道:創建優秀產品、服務和用戶體驗的七個原則
- Scratch3.0趣味編程動手玩:比賽訓練營
- Web性能實戰
- 青少年學Python(第2冊)
- Visual Basic語言程序設計基礎(第3版)
- Python Linux系統管理與自動化運維
- Java編程指南:語法基礎、面向對象、函數式編程與項目實戰
- 計算思維與Python編程