My free, weekly “Python for non-programmers” course continues! Our topic for today: Dictionaries, the most important data structure in Python. If you’ve always wanted to program, then it’s still not to late to join us. The course is completely free of charge, and gives you free access to the course recordings (including previous lessons), forever…
Consider the following (ridiculous) Python function: def myfunc(): return 1 return 2 return 3 I can define the function, and then run it. What do I get back? >>> myfunc() 1 Not surprisingly, I get 1 back. That’s because Python reaches that first “return” statement and returns 1. There’s no need to continue onto the…
The next session of my free, weekly, live “Python for non-programmers” course continues tomorrow, on May 8th. You can sign up at https://PythonForNonProgrammers.com/. More than 1,700 people from around the world have already joined! This week’s topics are: Turning strings into lists (and vice versa) Tuples Anyone who joins gets access to all previous recordings,…
A new cohort of Weekly Python Exercise A2 (“Functions for beginners”) starts tomorrow — Tuesday, May 5th. If you’ve been using Python for less than one year, and want to write better, more powerful, more idiomatic functions that do more with less code — then this is the course for you. WPE’s time-tested formula combines…
This is a reminder that my free, weekly “Python for non-programmers” course will continue tomorrow (Friday), May 1st, at 10 a.m. Eastern. In this session, our 7th, we’ll talk abut lists! (This is more exciting than it might sound at first.) The course is 100% free of charge and without obligation. All sessions are recorded…
PyCon didn’t happen in Pittsburgh, as planned, thanks to the coronavirus and covid-19. But it did happen online, and I was delighted to be able to present a talk! Here’s the talk video: And here are the slides, which you can download and use: Please send comments via e-mail to reuven@lerner.co.il or on Twitter to…
It happens to all of us: You write some Python code, but you encounter an error: >>> for i in 10: # this will not work! print(i) TypeError: ‘int’ object is not iterable This isn’t just an error, but an exception. It’s Python’s way of saying that there was a problem in a defined way,…
If you’ve programmed in Python for even a short amount of time, then you’ve probably written a fair number of functions. But many newcomers to Python don’t understand just how useful and powerful functions can be: We can treat functions as nouns, not just as verbs — passing them as arguments, and storing them in…
My free, weekly “Python for non-programmers” course continues tomorrow, Friday April 24th, at 10 a.m. Eastern. If you’ve ever wanted to learn to program, then you’re always free to join. (About 1,600 people have already done so.) And yes, we’ve been going for a month already… but if you join, you have access to all…
My free, weekly “Python for non-programmers” course continues! Today, we’ll start to talk about “strings” — in other words, text! Letters, words, sentences, and anything else contains text is a string in Python. Join me for the live session, and get access to all previous recordings, Jupyter notebooks, and our private forum, by registering at…