معرفی کتاب «Learn Python in 7 days : get up-and-running with Python» نوشتهٔ Mohit,, Das, Bhaskar N.، منتشرشده توسط نشر Packt Publishing - ebooks Account; Packt Publishing در سال 2017. این کتاب در 5 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است. «Learn Python in 7 days : get up-and-running with Python» در دستهٔ بدون دستهبندی قرار دارد.
Key Features* Make the best of Python features * Learn the tinge of Python in 7 days * Learn complex concepts using the most simple examples Book DescriptionPython is a great language to get started in the world of programming and application development. This book will help you to take your skills to the next level having a good knowledge of the fundamentals of Python. We begin with the absolute foundation, covering the basic syntax, type variables and operators. We'll then move on to concepts like statements, arrays, operators, string processing and I/O handling. You'll be able to learn how to operate tuples and understand the functions and methods of lists. We'll help you develop a deep understanding of list and tuples and learn python dictionary. As you progress through the book, you'll learn about function parameters and how to use control statements with the loop. You'll further learn how to create modules and packages, storing of data as well as handling errors. We later dive into advanced level concepts such as Python collections and how to use class, methods, objects in python. By the end of this book, you will be able to take your skills to the next level having a good knowledge of the fundamentals of Python. What you will learn* Use if else statement with loops and how to break, skip the loop * Get acquainted with python types and its operators * Create modules and packages * Learn slicing, indexing and string methods * Explore advanced concepts like collections, class and objects * Learn dictionary operation and methods * Discover the scope and function of variables with arguments and return value About the Author**Mohit** is a Python programmer with a keen interest in the field of information security. He has completed his bachelor's degree in technology in computer science from Kurukshetra University, Kurukshetra, and master's in engineering (2012) in computer science from Thapar University, Patiala. He is a C|EH, ECSA from EC-Council USA and a former IBMer. He currently works in Sapient. He has published several articles in national and international magazines. He is the author of Python Penetration Testing Essentials and Python: Penetration Testing for Developers, also by Packt. **Bhaskar N. Das** is an application developer with a keen interest in the field of analytics and financial markets. He completed his Bachelor of Technology in Mechanical Engineering from Dehradun Institute of Technology, India and his master's degree in science (2014) in CSR and ethical management from FH BFI, Vienna, Austria. He has eight years of experience with IBM and has worked on several web and analytics-related technologies. He has published technical articles in leading magazines. Table of Contents1. Getting Started with Python 2. Type Variables and Operators 3. Strings 4. Lists 5. Dictionary 6. Control Statements and Loops 7. Function and Scope of Variable 8. Modules and Packages 9. File Handling and Exceptions 10. Collections 11. Class and Objects Cover......Page 1 Copyright......Page 3 Credits......Page 4 About the Authors......Page 5 About the Reviewer......Page 6 www.PacktPub.com......Page 7 Customer Feedback......Page 8 Table of Contents......Page 9 Preface......Page 15 Why Python?......Page 20 Implementations of Python......Page 21 Installation on Windows platform......Page 22 Installation on Linux platform......Page 25 Installation on Mac OS......Page 26 Python interactive shell......Page 28 Setting environment variables in Windows......Page 30 Writing a simple Hello World! program ......Page 34 Basic Python syntax......Page 35 Triple, double and single quotes......Page 36 Python back slash......Page 38 Escape sequence in Python......Page 39 Formatted output......Page 40 Summary......Page 41 Variables......Page 42 Data types in Python......Page 43 Integers and long integers......Page 44 Floating point numbers......Page 45 Complex numbers......Page 46 Boolean data type......Page 47 String data types......Page 48 American Standard Code for Information Interchange (ASCII) character sets......Page 49 Conversion functions......Page 50 Arithmetic expressions......Page 51 Mixed Mode Conversion......Page 52 Operators......Page 53 Comparison operators......Page 54 Variants of assignment operator......Page 57 Bitwise operators......Page 58 Logical operators......Page 59 Membership operators......Page 60 Identity operators......Page 61 Operator precedence......Page 64 Summary......Page 65 Python strings......Page 66 The subscript operator......Page 67 Slicing for substrings......Page 68 Python string methods......Page 70 String case methods......Page 71 String strip methods......Page 73 String split methods......Page 74 String justify methods ......Page 75 String Boolean methods......Page 78 String functions ......Page 82 Creating tuple with elements......Page 84 Slicing of tuple......Page 85 Unpacking the items of tuples ......Page 87 Tuple functions......Page 88 Operations of tuples......Page 90 Summary ......Page 91 Creating a list with values......Page 92 Unpacking list values......Page 93 Slicing the list......Page 94 Updating the list......Page 95 Addition of Python lists......Page 96 Multiplication of lists......Page 97 in operator......Page 98 max ()......Page 99 list ()......Page 100 sorted ()......Page 101 append ()......Page 102 extend ()......Page 103 Difference between append and extend.......Page 104 index ()......Page 105 insert()......Page 106 remove()......Page 107 pop()......Page 108 List comprehensions......Page 112 Summary......Page 115 Overview of dictionary......Page 116 Accessing the values of dictionary......Page 117 Deleting an item from the dictionary......Page 118 Adding an item to the dictionary......Page 119 max()......Page 120 dict()......Page 121 copy()......Page 123 setdefault()......Page 125 keys()......Page 126 values()......Page 127 clear()......Page 128 Python dictionary with for loop......Page 129 Practical program......Page 131 Exercise......Page 132 Summary......Page 133 Control statements......Page 134 The if and if...else statement......Page 135 The if...elif...else statement......Page 137 Types of loops......Page 139 Definite loop......Page 140 Indefinite loop......Page 145 The while True and break statement......Page 148 The break statement......Page 150 Nested loops......Page 151 The continue and pass statements......Page 152 The pass statement......Page 154 Summary......Page 155 Functions......Page 156 Categories of functions......Page 157 Function definition......Page 158 Calling a function......Page 159 Function with arguments......Page 160 Function with an argument and return type......Page 162 Function with default argument......Page 163 Function with variable length argument......Page 164 Key-value pair as variable length argument......Page 165 Pass by reference versus pass by value......Page 166 Scope of variables......Page 168 Memory management......Page 173 Summary......Page 174 Modules ......Page 175 The import statement......Page 176 Locating Python modules......Page 180 Compiled Python files......Page 183 The Python package......Page 186 Summary......Page 188 The read() method......Page 189 The readline() method......Page 191 The readlines() method......Page 192 Exercise......Page 193 Writing text to a file......Page 194 Pickling......Page 198 Unpickling......Page 199 Exceptions......Page 201 The try statement with an except clause......Page 202 Multiple exception blocks......Page 204 The try...finally statement......Page 206 The exception argument......Page 207 Raising exceptions......Page 208 User-defined exceptions......Page 209 Summary......Page 211 Collections......Page 212 Counter......Page 213 Update function......Page 216 Usage of counters......Page 218 Operations of Python collection counter......Page 222 Deque......Page 223 Populating deque......Page 224 Deque consumption......Page 226 Deque rotation......Page 227 Ordered dictionary......Page 228 Sorting of ordered dictionary based upon keys......Page 229 Sorting of ordered dictionary based upon values......Page 230 Default dictionary......Page 232 Sample problem solved by the default dictionary - scenario one......Page 235 Sample problem solved by the default dictionary - scenario two......Page 236 Named tuple......Page 237 Adding values and creating a dictionary ......Page 239 Summary......Page 241 Key concepts......Page 242 Creating a class......Page 243 Instance variables......Page 244 The __init__ method......Page 245 Class variables......Page 250 Class inheritance......Page 255 Multiple inheritance......Page 259 Overriding methods......Page 260 Operator overloading......Page 261 The class method......Page 266 The static method......Page 268 The private variable......Page 269 Summary......Page 271 Index......Page 272 Key FeaturesMake the best of Python featuresLearn the tinge of Python in 7 daysLearn complex concepts using the most simple examplesBook DescriptionPython is a great language to get started in the world of programming and application development. This book will help you to take your skills to the next level having a good knowledge of the fundamentals of Python. We begin with the absolute foundation, covering the basic syntax, type variables and operators. We'll then move on to concepts like statements, arrays, operators, string processing and I/O handling. You'll be able to learn how to operate tuples and understand the functions and methods of lists. We'll help you develop a deep understanding of list and tuples and learn python dictionary. As you progress through the book, you'll learn about function parameters and how to use control statements with the loop. You'll further learn how to create modules and packages, storing of data as well as handling errors. We later dive into advanced level concepts such as Python collections and how to use class, methods, objects in python. By the end of this book, you will be able to take your skills to the next level having a good knowledge of the fundamentals of Python. What you will learnUse if else statement with loops and how to break, skip the loopGet acquainted with python types and its operatorsCreate modules and packagesLearn slicing, indexing and string methodsExplore advanced concepts like collections, class and objectsLearn dictionary operation and methodsDiscover the scope and function of variables with arguments and return valueAbout the Author Mohit (mohitraj.cs@gmail.com) is a Python programmer with a keen interest in the field of information security. He has completed his bachelor's degree in technology in computer science from Kurukshetra University, Kurukshetra, and master's in engineering (2012) in computer science from Thapar University, Patiala. He is a C|EH, ECSA from EC-Council USA and a former IBMer. He currently works in Sapient. He has published several articles in national and international magazines. He is the author of Python Penetration Testing Essentials and Penetration Testing for Developers, also by Packt. Bhaskar N. Das (bhaskarndas@gmail.com) is an application developer with a keen interest in the field of analytics and financial markets. He completed his Bachelor of Technology in Mechanical Engineering from Dehradun Institute of Technology, India and his master's degree in science (2014) in CSR and ethical management from FH BFI, Vienna, Austria. He has eight years of experience with IBM and has worked on several web and analytics-related technologies. He has published technical articles in leading magazines. Table of ContentsGetting Started with PythonType Variables and OperatorsStringsListsDictionaryControl Statements and Loops Function and Scope of VariableModules and PackagesFile Handling and ExceptionsCollectionsClass and Objects Learn efficient Python coding within 7 days About This Book Make the best of Python features Learn the tinge of Python in 7 days Learn complex concepts using the most simple examples Who This Book Is For The book is aimed at aspiring developers and absolute novice who want to get started with the world of programming. We assume no knowledge of Python for this book. What You Will Learn Use if else statement with loops and how to break, skip the loop Get acquainted with python types and its operators Create modules and packages Learn slicing, indexing and string methods Explore advanced concepts like collections, class and objects Learn dictionary operation and methods Discover the scope and function of variables with arguments and return value In Detail Python is a great language to get started in the world of programming and application development. This book will help you to take your skills to the next level having a good knowledge of the fundamentals of Python. We begin with the absolute foundation, covering the basic syntax, type variables and operators. We'll then move on to concepts like statements, arrays, operators, string processing and I/O handling. You'll be able to learn how to operate tuples and understand the functions and methods of lists. We'll help you develop a deep understanding of list and tuples and learn python dictionary. As you progress through the book, you'll learn about function parameters and how to use control statements with the loop. You'll further learn how to create modules and packages, storing of data as well as handling errors. We later dive into advanced level concepts such as Python collections and how to use class, methods, objects in python. By the end of this book, you will be able to take your skills to the next level having a good knowledge of the fundamentals of Python. Style and approach Fast paced guide to get you up-to-speed with the language. Every chapter is followed by an exercise that focuses on building something with the language. The codes of the exercises can be found on the Packt website Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the code file
Learn efficient Python coding within 7 daysAbout This Book• Make the best of Python features• Learn the tinge of Python in 7 days• Learn complex concepts using the most simple examplesWho This Book Is ForThe book is aimed at aspiring developers and absolute novice who want to get started with the world of programming. We assume no knowledge of Python for this book.What You Will Learn• Use if else statement with loops and how to break, skip the loop• Get acquainted with python types and its operators• Create modules and packages• Learn slicing, indexing and string methods• Explore advanced concepts like collections, class and objects• Learn dictionary operation and methods• Discover the scope and function of variables with arguments and return valueIn DetailPython is a great language to get started in the world of programming and application development. This book will help you to take your skills to the next level having a good knowledge of the fundamentals of Python.We begin with the absolute foundation, covering the basic syntax, type variables and operators. We'll then move on to concepts like statements, arrays, operators, string processing and I/O handling. You'll be able to learn how to operate tuples and understand the functions and methods of lists. We'll help you develop a deep understanding of list and tuples and learn python dictionary. As you progress through the book, you'll learn about function parameters and how to use control statements with the loop. You'll further learn how to create modules and packages, storing of data as well as handling errors. We later dive into advanced level concepts such as Python collections and how to use class, methods, objects in python.By the end of this book, you will be able to take your skills to the next level having a good knowledge of the fundamentals of Python.Style and approachFast paced guide to get you up-to-speed with the language. Every chapter is followed by an exercise that focuses on building something with the language. The codes of the exercises can be found on the Packt website
Cover ; Copyright; Credits; About the Authors; About the Reviewer; www.PacktPub.com; Customer Feedback; Table of Contents; Preface; Chapter 1: Getting Started with Python; Why Python?; Python applications; Versions€; Implementations of Python; Installation; Installation on Windows platform; Installation on Linux platform; Installation on Mac OS; Notepad++ installation; Python file formats; Python interactive shell; System or environment variables; Setting environment variables in Windows; Setting environment variables in Linux; Setting environment variables in Mac OS (OS 10.9).;Chapter 5: Dictionary; Overview of dictionary; Operations on the dictionary; Accessing the values of dictionary; Deleting an item from the dictionary; Updating the values of the dictionary; Adding an item to the dictionary; Dictionary functions; len(); str(); max(); min(); dict(); Dictionary methods; copy(); get(); setdefault(); has_key(); keys(); values(); update(); items(); clear(); Python dictionary with for loop; Practical program; Exercise; Summary; Chapter 6: Control Statements and Loops; Control statements; The if and if ... else statement; The if ... elif ... else statement; Loops.