
Python for Developers
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions
Content
- Cover Page
- Title Page
- Copyright Page
- Dedication
- About the Author
- About the Reviewers
- Acknowledgement
- Preface
- Errata
- Table of Contents
- 1. Introduction to Python
- Structure
- Objective
- What is Python?
- Reasons to choose Python
- Multi-purpose
- Vast library and module support
- Readability
- Object-Oriented
- Platform independent
- Python is dynamically typed and strongly typed
- Python installation
- Installation of Python 3.x in Windows 10
- Installation of Python in Linux
- Basic Python syntax
- Print statement
- Saving the program
- Triple quotes
- Python Back Slash \
- Escape sequence of string
- Python formatted output
- Conclusion
- Questions
- 2. Python Operators
- Structure
- Objective
- Variables
- Assignment statement
- Multiple assignment
- Numeric data types
- Integer numbers
- Floating-point numbers
- Python character sets
- Conversion functions
- Operators
- Arithmetic operators
- Type conversions
- Comparison operators
- Assignment operators
- Bitwise operators
- Logical operators
- Membership operators
- Identity Operators
- Operator precedence
- Advance part
- Conclusion
- Questions
- 3. Control Statement and Loop
- Structure
- Objective
- Conditional statement
- If and if-else statements
- if statement
- Tabs or Spaces?
- if-else statement
- if-elif-else structure
- Range()
- Loops
- For loop
- Printing number 0 to 9
- Printing the numbers in horizontal fashion
- For loop with string
- Exercise 1
- Exercise 2
- while loop
- Break statement
- Break statement with the while loop
- Continue statement
- else statement
- pass statement
- Conclusion
- Questions
- 4. Strings
- Structure
- Objective
- Indexing using subscript operator
- Slicing for substrings
- String methods
- count()
- find()
- Justify methods
- ljust()
- rjust()
- center()
- zfill()
- Case methods
- lower()
- upper()
- capitalize()
- swapcase()
- Strip methods
- replace()
- Split methods
- Partition methods
- Join method
- String Boolean methods
- startswith()
- endswith()
- isdigit()
- isalpha()
- isalnum()
- isspace()
- format()
- String functions
- Max()
- min()
- Conclusion
- Question
- 5. Tuple and List
- Structure
- Objective
- Tuple
- Creating tuple
- Empty tuple
- Creating tuple with the items
- Indexing tuple
- Slicing of tuple
- Tuple methods
- index()
- Tuple functions
- len()
- max()
- Min()
- Operations of Tuples
- Addition of tuples
- Multiplication of tuple
- In operator
- for loop with tuple
- Unpacking of tuple
- List
- Creating a list
- Empty list
- List with the elements
- List operations
- Accessing item of a list
- Updating list
- Deleting list item
- Addition of the lists
- Multiplication of List
- in operator
- List with for loop
- List functions
- len()
- max()
- List methods
- Insert methods
- append()
- insert()
- Deletion
- remove()
- pop()
- count()
- index()
- Copy()
- Sort()
- reverse()
- List comprehensions
- Exercise
- Conclusion
- Questions
- 6. Dictionary and Sets
- Structure
- Objective
- Dictionary
- Creating a dictionary
- Features of dictionary
- Operations on dictionary
- Accessing the values of dictionary
- Deleting item from dictionary
- Updating and adding in the dictionary
- Adding item to dictionary
- Dictionary functions
- len(dict)
- Max(dict)
- Dictionary methods
- copy()
- get()
- setdefault()
- items()
- keys()
- values()
- update()
- Exercise
- Set
- With item
- Without items
- add()
- remove()
- Conclusion
- Questions
- 7. Function
- Structure
- Objective
- What is function?
- Defining a Python function
- Function with positional arguments
- Function with the arguments and return value
- Function with default argument
- Function with variable-length arguments
- Function with keyworded arguments
- Argument pass by reference or value
- Scope
- Types of scope
- Local scope
- Enclosing scope
- Global scope
- Built-in scope
- Memory management
- Scope of variables
- Conclusion
- Questions
- 8. Module
- Structure
- Objective
- Module
- The import statement
- The from statement
- Locating Python modules
- Compiled Python files
- dir()
- The __name__ statement
- Python package
- Importing the modules from different path
- Conclusion
- Questions
- 9. Exception Handling
- Structure
- Objective
- Exception
- Try statement with an except clause
- Multiple exception block
- else in exception
- finally statement
- Program find its exception type
- Raising an exception
- Advance section
- User-defined exceptions
- Exercise
- Conclusion
- Questions
- 10. File Handling
- Structure
- Objective
- Text files
- Reading text from a file
- Writing text to a file
- The with statement
- Pickle
- Reading data from file and unpickling
- JSON with Python
- Exercise
- Conclusion
- Questions
- 11. Collections
- Structure
- Objective
- Counter
- Counter methods
- update()
- Counter operations
- Addition
- Subtraction
- Union
- Intersection
- Deque
- Deque populating
- deque consuming
- deque rotating
- Namedtuple
- The default dictionary
- Function as default_factory
- int as default factory
- list as default_factory
- The ordered dictionary
- Sorted of dictionary based upon key
- Sort the dictionary based upon values
- Conclusion
- Question
- 12. Random Modules and Built-in Function
- Structure
- Objective
- The random module
- Random functions for integers
- randint()
- randrange()
- Random functions for sequence
- Choice(rnlist)
- shuffle()
- Sample()
- Random functions for floats
- random()
- Uniform(start, end)
- Exercise
- The Tombola game
- The OTP generator
- Python special functions
- Lambda
- filter()
- map()
- reduce()
- isinstance()
- eval()
- repr()
- Conclusion
- Questions
- 13. Time
- Structure
- Objective
- The time module
- Current Epoch time
- Current time
- Creating time difference
- Conversion of human-readable date to epoch time
- time.sleep(second)
- The datetime module
- datetime.datetime.now()
- datetime.timedelta class
- Dealing with Timezone with the pytz module
- The calendar module
- Printing a full month
- Printing a year
- Curious case of 1752
- Checking the leap year
- Conclusion
- Questions
- 14. Regular Expression
- Structure
- Objective
- Regular expression
- Regular expression functions
- match()
- search()
- sub()
- findall()
- re.compile(pattern)
- Special characters
- . (dot)
- ^ (Caret)
- $ (dollor)
- * (star)
- + (plus)
- ?
- {m}
- {m,n}
- []
- [^]
- \w
- Exercise
- Conclusion
- Questions
- 15. Operating System Interfaces
- Structure
- Objective
- Getting the OS name
- os.environ
- Directory and file accessing functions
- os.access()
- os.rename(old, new)
- os.stat()
- Directory functions
- os.getcwd()
- os.chdir()
- File and folder listing
- os.listdir(path)
- os.walk()
- Executing OS command
- os.popen()
- os.system()
- Exercise 1
- Exercise 2
- Conclusion
- Questions
- 16. Class and Objects
- Structure
- Objective
- Class
- Object
- Instance variable
- The __init__ method or constructor
- Regular method
- Class variable
- Class inheritance
- Multilevel inheritance
- Multiple inheritance
- Operator overloading
- Class method
- Static method
- Private method and private variable
- Decorator @property @setter and @deleter
- Callable objects
- Conclusion
- Questions
- 17. Threads
- Structure
- Objective
- Thread
- Thread creation using class
- Thread creation using function
- Important threading methods
- The join method
- The join method with time
- The Daemon thread
- Lock
- Problem 1
- Problem 2
- Lock versus Rlock
- GIL
- Where to use multithreading?
- What is internal delay?
- How many threads?
- Conclusion
- Questions
- 18. Queue
- Structure
- Objective
- Queue
- FIFO queue
- LIFO queue
- Priority queue
- Queue with threads
- Conclusion
- Questions
- 19. Multiprocessing and Subprocess
- Structure
- Objective
- Python multi-processing
- The Process class
- Killing a Process
- The Daemon process
- The communication between the processes
- Shared memory
- Value
- Array
- The Manager class
- Exchanging object through the communication channel
- Pipe
- Subprocess
- Difference between subprocess and multi-processing
- The call() function
- Popen()
- Conclusion
- Questions
- 20. Useful Modules
- Structure
- Objective
- Configparser
- Loggers
- Argparse
- The positional argument
- Positional arguments with Help message and Type
- The Argparse optional argument
- nargs
- Subparser
- Debugging
- Setting a breakpoint
- Conclusion
- Questions
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.