Learn Python the Right Way

“Learn Python the Right Way” delves into the nuances of Python programming, exploring topics like the speed of Python, considerations for productivity, and the importance of short-term memory in AI applications. The document discusses the significance of maintaining conversation history, utilizing tools like Langchain for context retention. It also touches on the use of PostgreSQL for persistent memory, showcasing a practical example of a short-term memory prototype. Additionally, the document highlights the relevance of fast and slow aspects in Python programming, shedding light on bottlenecks in development and runtime for enhanced productivity.

Learn about The way of the program

 Learn Python the Right Way

(Watch a video based on this chapter here on YouTube .) The goal of this book is to teach you to think like a computer scientist. This way of thinking combines some of the best features of mathematics...

📚 Read more at Learn Python the Right Way
🔎 Find similar documents

Learn about Variables, expressions and statements

 Learn Python the Right Way

(Watch a video based on this chapter here on YouTube .) 2.1. Values and data types A value is one of the fundamental things — like a letter or a number — that a program manipulates. The values we have...

📚 Read more at Learn Python the Right Way
🔎 Find similar documents

Learn about Fruitful functions

 Learn Python the Right Way

6.1. Return values The built-in functions we have used, such as abs , pow , int , max , and range , have produced results. Calling each of these functions generates a value, which we usually assign to...

📚 Read more at Learn Python the Right Way
🔎 Find similar documents

Learn about Hello, little turtles!

 Learn Python the Right Way

There are many modules in Python that provide very powerful features that we can use in our own programs. Some of these can send email, or fetch web pages. The one we’ll look at in this chapter allows...

📚 Read more at Learn Python the Right Way
🔎 Find similar documents

Learn about Functions

 Learn Python the Right Way

4.1. Functions In Python, a function is a named sequence of statements that belong together. Their primary purpose is to help us organize programs into chunks that match how we think about the problem...

📚 Read more at Learn Python the Right Way
🔎 Find similar documents

Learn about Conditionals

 Learn Python the Right Way

Programs get really interesting when we can test conditions and change the program behaviour depending on the outcome of the tests. That’s what this chapter is about. 5.1. Boolean values and expressio...

📚 Read more at Learn Python the Right Way
🔎 Find similar documents
 Learn Python the Right Way

Different kinds of errors can occur in a program, and it is useful to distinguish among them in order to track them down more quickly: Syntax errors are produced by Python when it is translating the s...

📚 Read more at Learn Python the Right Way
🔎 Find similar documents

Learn about Trees

 Learn Python the Right Way

Like linked lists, trees are made up of nodes. A common kind of tree is a binary tree , in which each node contains a reference to two other nodes (possibly None ). These references are referred to as...

📚 Read more at Learn Python the Right Way
🔎 Find similar documents

Learn about Iteration

 Learn Python the Right Way

Computers are often used to automate repetitive tasks. Repeating identical or similar tasks without making errors is something that computers do well and people do poorly. Repeated execution of a set ...

📚 Read more at Learn Python the Right Way
🔎 Find similar documents

Learn about Strings

 Learn Python the Right Way

8.1. A compound data type So far we have seen built-in types like int , float , bool , str and we’ve seen lists and pairs. Strings, lists, and pairs are qualitatively different from the others because...

📚 Read more at Learn Python the Right Way
🔎 Find similar documents

Learn about Event handling

 Learn Python the Right Way

10.1. Event-driven programming Most programs and devices like a cellphone respond to events – things that happen. For example, you might move your mouse, and the computer responds. Or you click a butt...

📚 Read more at Learn Python the Right Way
🔎 Find similar documents

Learn about Queues

 Learn Python the Right Way

This chapter presents two ADTs: the Queue and the Priority Queue. In real life, a queue is a line of people waiting for something. In most cases, the first person in line is the next one to be served....

📚 Read more at Learn Python the Right Way
🔎 Find similar documents