Some quick Python notes

Akira
Akira
Nov 5 · 1 min read

These are notes as I do morning warm-up with Python on CodeWars.

Python != Ruby

(duh)

Some major differences off the bat:

Return values in Ruby are implicitly tied to the last line of code run. Return values in Python need to be explicit. If you don’t tell Python to return something, it..won’t.

Python methods always take an argument, even if its an empty parenthesis. There is no ‘end’ block. Also, put a colon on the first line. Keep spacing consistent. If you use one tab, always use one…

Keep the story going. Sign up for an extra free read.

You've completed your member preview for this month, but when you sign up for a free Medium account, you get one more story.
Already have an account? Sign in

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade