چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

Python Grammar: Learn to speak Python

learning curve books

قیمت نهایی

۴۴٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۰٪ تخفیف
  • تخفیف زمان‌دار−۵٬۰۰۰ تومان

۵٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

نویسنده
learning curve books
سال انتشار
۲۰۲۳
فرمت
PDF
زبان
انگلیسی
حجم فایل
۷٫۵ مگابایت
شابک
9788646258085، 9798646258084، 8646258084

دربارهٔ کتاب

Every time a book is written it assumes some type of audience. This book, Python Grammar– as the title suggests– is about examining fundamentals of Python. It was written for someone new to Python language and learning it from scratch. To avoid being a rudimentary guideline similar to Python tutorials that can be found online for free, some of the chapters will be augmented by providing slightly more complex examples. This is especially useful for those learners who seek practical examples or simply want to be challenged while still learning. Python is a tool for problem solvers who appreciate writing clean, elegant code. It offers a vast array of simple language features. You might not need to know all of them– but learning them one at a time gets you closer to Pythonic Thinking. Python is a type of language that provides common functionality from many packages that come with it by default. Most packages are congruent with the original feature set and play well together with existing data types. Elegant code is not only code that looks clean, but the kind that also follows logical aesthetic– Python is perfect for writing logically elegant code without sacrificing performance– but only when its features are understood in context of their intended purpose. One goal of this book is to develop that awareness. Python Grammar 1 Python Grammar 1.1 Preface 1.1.1 Installation 1.1.2 Python is a simple language that helps you deal with complex problems in an elegant way 1.1.3 Source Code 1.2 Thinking in Python 1.2.1 Convert Kilometers to Miles 2 Getting To Know Python 2.1 Zen of Python 2.2 Basics 2.2.1 Statements and Expressions Statements if-statements Expressions if-else if and not 2.2.2 Semicolons 2.2.3 Simple Program 2.2.4 A Common Pitfall Poetic Python 2.3 Running Python Scripts 2.3.1 Python comments 2.3.2 An early exit 3 Python Programming Language 3.1 Basic Operations 3.1.1 Learning To Speak In Python Comments Printing Values Printing Multiple Values Using {} placeholders and string's .format() method Formatting dynamic text values in proper English The .format() method automatically interprets value by type Floating point and .format() method Floating point with decimal point Using % value interpretation character 3.1.2 Conditions 3.1.3 if and if...else statements 3.2 Operators 3.2.1 Arithmetic Operators Assignment operator Math operators ** exponentiation operator // floor division operator % modulus operator 3.2.2 Assignment Operators += increment assignment -= decrement assignment *= multiplication assignment /= division assignment **= power assignment //= floor division assignment String Multiplication == Equality operator Absence of ++ operator Absence of === operator 3.2.3 Comparison Operators 3.2.4 Logical Operators 3.2.5 Identity Operators 3.2.6 Membership Operators 3.2.7 Bitwise Operators Bitwise & operator Bitwise | (OR) operator Bitwise XOR operator Bitwise NOT operator Bitwise shift left operator Bitwise shift right operator 4 Loops 4.1 for loops 4.1.1 for-in loop syntax 4.1.2 Iterating lists 4.1.3 Using iter() to iterate a list 4.1.4 Iterating in reverse 4.1.5 Nested iterables 4.1.6 Looping through numbers 4.1.7 Iterating index and values at the same time 4.2 while loops 4.2.1 while loop syntax 4.2.2 while loops and not operator 5 Variables 5.1 Naming variables, variable types, memory and... 5.1.1 What is a variable? 5.1.2 How to find out variable's memory address 5.1.3 Built-in id() function 5.1.4 Built-in hex() function 5.1.5 Shared memory for variables containing the same value 5.1.6 Assignment by reference vs. assignment by value 5.1.7 Why assign by reference? 5.1.8 Python Timers 5.1.9 Shallow Copy What is a shallow copy? Deep copy 5.1.10 Stack, Heap and Garbage Collection 5.1.11 Stack Overflow 6 Data Types and Structures Mutability Lists, Dictionaries and Ranges Sequences 6.0.1 Built-in type() function 6.0.2 Duck Typing 6.0.3 Data Types and Data Structures Classes and type() 6.0.4 Working with data types 6.0.5 bool 6.1 str 6.2 int 6.3 float 6.4 complex 6.5 dict Combining dictionaries Working with dictionaries dict.clear() dict.copy() dict.fromkeys() dict.get() dict.items() dict.keys() dict.values() dict.pop() dict.popitem() dict.setdefault() dict.update() 6.6 list Combining lists list.append() list.extend() list.clear() list.copy() list.count() list.index() list.insert() list.remove() list.pop() list.reverse() list.sort() 6.7 range(start, end) or range(total) 6.8 tuple tuple is immutable Nested tuples tuple.count() tuple.index() Constructing tuples containing 0 or 1 items. Slicing sequences with [start:stop:step] Slicing is not indexing Slice examples Other use cases Third argument Reversing a sequence Replacing items Replacing with step Using del and slices to remove items 6.9 set set.add() set.discard() set.isdisjoint() set.issubset() set.clear() set.copy() set.update() set.intersection() set.intersection_update() set.difference() set.difference_update() 6.9.1 frozenset Variable order of items in set and frozenset 7 Functions 7.1 Using return keyword to return values 7.2 Function Parameters and Arguments 7.2.1 Positional arguments 7.2.2 Default arguments 7.2.3 Keyword arguments 7.2.4 Mixing keyword and default arguments 7.2.5 Arbitrary arguments 7.2.6 Built-in functions 7.2.7 Overwriting built-in functions 7.2.8 Practical example What are we calculating? Preparing the data Writing seconds2elapsed function Using seconds2elapsed Function 8 Built-in Functions 8.0.1 User input eval() tealprintblack() callable() open() len() slice() abs() chr() id() hex() bool() int() complex() str() dict() float() tuple() 9 Overloading Operators 9.1 Magic Methods 9.1.1 3D Vector Class 10 Classes 10.0.1 Class Constructors Instantiating an object Object attributes Making object constructors more flexible 10.0.2 Using purple__new__black constructor 10.0.3 Using __new__ and __init__ together self overrides cls Memory optimization with __slots__ 10.1 Instance, Class and Static Methods 10.1.1 Instance methods 10.2 Static methods 10.2.1 Class Methods 10.2.2 Static methods 10.2.3 Static Attributes 10.3 Objects 10.4 Constructors Another Class Example Prettifying JSON output 11 File System 11.0.1 File operations Opening files with built-in open() function Error handling 11.0.2 Handling Exceptions with try: except: block try: except: block Raising exceptions Open file modes Reading data from file Reading data from file one line at a time Writing to a file with write() function Appending data to a file with "a" and write() Using os package Deleting files 11.1 Desktop Salvation 12 MongoDB 12.0.1 Inserting Dictionaries Into Mongo Collections 12.0.2 .insert_one() method 13 What can Python be used for? 13.0.1 Machine Learning 13.0.2 Blockchain 13.0.3 Pygame 13.0.4 Arduino 13.1 Amazon AWS 13.2 Algebra, Matrices and Image Processing 13.3 MySQL, MongoDB or PostgreSQL 13.4 File System Operations 13.5 Math Library 13.6 The Story Behind Python Logo 13.7 Python Grammar 13.8 Which Python? 13.9 Book Format 13.10 Learning Python 14 Installing Python 14.1 Installing on Windows 14.2 Installing on Mac 14.2.1 Checking current Python version 14.2.2 Installing GCC 14.2.3 Installing XCode command line tools 14.2.4 The OXC GCC installer 14.3 Using python command 14.4 Running python scripts system-wide 14.5 Using Python Shell 14.6 python command usage 15 Other Web & Software Development Books 15.1 CSS Visual Dictionary 15.2 JavaScript Grammar 15.3 Node API

قیمت نهایی

۴۴٬۰۰۰ تومان