Summary

In this chapter, we covered a wide spectrum of compound statements. In particular, we covered the if clause, which allows us to build logical forks – parts of code that are executed if a condition is met. We also discussed two types of loops, which allow us to run the same code multiple times, in repetition. Lastly, we covered try/except/finally and with clauses, which gives us options in terms of catching errors on the fly, without halting execution of the script, and guaranteeing that given connections, such as open files, are handled properly.

This chapter concludes our tour of the basics of the language. By no means have we covered it all! However, from now on, we will depart from the sandbox example and start writing code that is actually useful.

In the next chapter, we'll start communicating with external APIs and process data. See you there!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.7.174