O'Reilly logo

Beginning Python: From Novice to Professional, Second Edition by Magnus Lie Hetland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

images

By now, I’m sure you are getting a bit impatient. All right—all these data types are just dandy, but you can’t really do much with them, can you?

Let’s crank up the pace a bit. You’ve already encountered a few statement types (print statements, import statements, and assignments). Let’s first take a look at some more ways of using these before diving into the world of conditionals and loops. Then you’ll see how list comprehensions work almost like conditionals and loops, even though they are expressions, and finally you’ll take a look at pass, del, and exec.

More About print and import

As you learn more about Python, you may notice that some ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required