AI-powered search & chat for Data / Computer Science Students
Preface
Preface This book is a short, introductory guide for the Python programming language. This book is well suited: As a reference material for Python beginner workshops If you have prior experience with ...
Read more at 100 Page Python IntroIntroduction
Introduction Wikipedia does a great job of describing about Python in a few words. So, I'll just copy-paste relevant information here: Python is an interpreted, high-level and general-purpose programm...
Read more at 100 Page Python IntroNumeric data types
Numeric data types Python is a dynamically typed language. The interpreter infers the data type of a value based on pre-determined rules. In the previous chapter, string values were coded using single...
Read more at 100 Page Python IntroStrings and user input
Strings and user input This chapter will discuss various ways to specify string literals. After that, you'll see how to get input data from the user and handle type conversions. Single and double quot...
Read more at 100 Page Python IntroDefining functions
Defining functions This chapter will discuss how to define your own functions, pass arguments to them and get back results. You'll also learn more about the print() built-in function. def Use the def ...
Read more at 100 Page Python IntroImporting and creating modules
Importing and creating modules The previous chapters focused on data types, functions (both built-in and user defined) and control structures. This chapter will show how to use built-in as well as use...
Read more at 100 Page Python IntroControl structures
Control structures This chapter will discuss various operators used in conditional expressions, followed by control structures. Comparison operators These operators yield True or False boolean values ...
Read more at 100 Page Python IntroException handling
Exception handling This chapter will discuss different types of errors and how to handle some of the them within the program gracefully. You'll also see how to raise exceptions programmatically. Synta...
Read more at 100 Page Python IntroDebugging
Debugging Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. — Brian W. ...
Read more at 100 Page Python IntroTesting
Testing Testing can only prove the presence of bugs, not their absence. — Edsger W. Dijkstra There, it should work now. — All programmers Above quotes chosen from this collection at softwareengineerin...
Read more at 100 Page Python IntroInstalling modules and Virtual environments
Installing modules and Virtual environments The standard modules are only a tiny fraction of the vast amount of libraries available for Python. The rich third-party ecosystem is one of the reasons why...
Read more at 100 Page Python IntroTuple and Sequence operations
Tuple and Sequence operations This chapter will discuss the tuple data type and some of the common sequence operations. Data types like str , range , list and tuple fall under Sequence types. Binary S...
Read more at 100 Page Python IntroList
List List is a container data type, similar to tuple , with lots of added functionality and mutable . Lists are typically used to store and manipulate ordered collection of values. Tuple and Sequence ...
Read more at 100 Page Python IntroText processing
Text processing This chapter will discuss str methods and introduce a few examples with the string and re modules. join The join() method is similar to what the print() function does with the sep opti...
Read more at 100 Page Python IntroMutability
Mutability int , float , str and tuple are examples for immutable data types. On the other hand, types like list and dict are mutable. This chapter will discuss what happens when you pass a variable t...
Read more at 100 Page Python IntroDealing with files
Dealing with files This chapter will discuss the open() built-in function and introduce some of the built-in modules for file processing. open and close The open() built-in function is one of the ways...
Read more at 100 Page Python IntroComprehensions and Generator expressions
Comprehensions and Generator expressions This chapter will show how to use comprehensions and generator expressions for map , filter and reduce operations. You'll also learn about iterators and the yi...
Read more at 100 Page Python IntroSet
Set set is a mutable, unordered collection of objects. frozenset is similar to set , but immutable. See docs.python: set, frozenset for documentation. Initialization Sets are declared as a collection ...
Read more at 100 Page Python IntroExecuting external commands
Executing external commands This chapter will discuss how you can execute external commands from Python, capture their output and other relevant details such as the exit status. The availability of co...
Read more at 100 Page Python IntroDict
Dict Dictionaries can be thought of as a collection of key-value pairs or a named list of items . It used to be unordered, but recent Python versions ensure that the insertion order is maintained. See...
Read more at 100 Page Python IntroCommand line arguments
Command line arguments This chapter will show a few examples of processing CLI arguments using sys and argparse modules. The fileinput module is also introduced in this chapter, which is handy for in-...
Read more at 100 Page Python Intro- «
- ‹
- ›
- »