Cargando…

Learn Python Programming : a Beginner's Guide to Learning the Fundamentals of Python Language to Write Efficient, High-Quality Code, 2nd Edition.

Learn Python Programming creates a foundation for those who are interested in developing their skills in Python programming. The book starts with the fundamentals of programming with Python and ends by exploring different topics, such as GUIs and real-world apps.

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Romano, Fabrizio
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Publishing Ltd, 2018.
Edición:2nd ed.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Title Page; Copyright and Credits; Dedication; Packt Upsell; Foreword; Contributors; Table of Contents; Preface; Chapter 1: A Gentle Introduction to Python; A proper introduction; Enter the Python; About Python; Portability; Coherence; Developer productivity; An extensive library; Software quality; Software integration; Satisfaction and enjoyment; What are the drawbacks?; Who is using Python today?; Setting up the environment; Python 2 versus Python 3; Installing Python; Setting up the Python interpreter; About virtualenv; Your first virtual environment; Your friend, the console.
  • How you can run a Python programRunning Python scripts; Running the Python interactive shell; Running Python as a service; Running Python as a GUI application; How is Python code organized?; How do we use modules and packages?; Python's execution model; Names and namespaces; Scopes; Objects and classes; Guidelines on how to write good code; The Python culture; A note on IDEs; Summary; Chapter 2: Built-in Data Types; Everything is an object; Mutable or immutable? That is the question; Numbers; Integers; Booleans; Real numbers; Complex numbers; Fractions and decimals; Immutable sequences.
  • Strings and bytesEncoding and decoding strings; Indexing and slicing strings; String formatting; Tuples; Mutable sequences; Lists; Byte arrays; Set types; Mapping types
  • dictionaries; The collections module; namedtuple; defaultdict; ChainMap; Enums; Final considerations; Small values caching; How to choose data structures; About indexing and slicing; About the names; Summary; Chapter 3: Iterating and Making Decisions; Conditional programming; A specialized else
  • elif; The ternary operator; Looping; The for loop; Iterating over a range; Iterating over a sequence; Iterators and iterables.
  • Iterating over multiple sequencesThe while loop; The break and continue statements; A special else clause; Putting all this together; A prime generator; Applying discounts; A quick peek at the itertools module; Infinite iterators; Iterators terminating on the shortest input sequence; Combinatoric generators; Summary; Chapter 4: Functions, the Building Blocks of Code; Why use functions?; Reducing code duplication; Splitting a complex task; Hiding implementation details; Improving readability; Improving traceability; Scopes and name resolution; The global and nonlocal statements.
  • Input parametersArgument-passing; Assignment to argument names doesn't affect the caller; Changing a mutable affects the caller; How to specify input parameters; Positional arguments; Keyword arguments and default values; Variable positional arguments; Variable keyword arguments; Keyword-only arguments; Combining input parameters; Additional unpacking generalizations; Avoid the trap! Mutable defaults; Return values; Returning multiple values; A few useful tips; Recursive functions; Anonymous functions; Function attributes; Built-in functions; One final example; Documenting your code.