Last chapter we finished C the careful way. An array is really an address, a string is a row of bytes that ends in a zero, and a variable needs an & in front of it before scanf may fill it. All that care buys speed and control. Now think about the other half of an ICT officer's day. A bank's IT cell receives a text file with a few lakh statement lines, and by lunchtime somebody wants the total of one column, the five biggest values and a tidy report. Nobody wants to size buffers and hunt for a missing \0 just for that. They open a Python file, write ten lines and run it.
Here is how different it feels. The biggest whole number that the largest standard unsigned integer type in C (unsigned long long) can hold is 18,446,744,073,709,551,615 (2⁶⁴ − 1), and one more overflows. In Python, print(2 ** 100) prints 1267650600228229401496703205376, a 31-digit number, correctly, with no declaration and no effort. Python takes over the details that C leaves to you: sizes, memory, the end of a string, even the curly braces. What does it ask in return? A new set of habits, and a handful of surprises that exam setters love.
By the end of this chapter you'll be able to say what Python is and how a .py file actually runs, and to read a short snippet and tell what it prints. You'll know why "5" + 3 is an error, why one stray space can stop a whole program, and which of Python 2's habits Python 3 dropped. You'll see a variable as a name tied to an object, tell mutable from immutable, and convert between types. You'll compute with /, //, % and **, including on negative numbers, and use the bit operators &, |, ^, ~, << and >>. And you'll slice a string, call its methods and format output three different ways.