Meta tags:
author= Jeff Knupp;
description= Python Programming;
Headings (most frequently used words):
python, about, jeff, to, for, with, write, pythonic, code, looking, tutoring, remote, and, local, nyc, available, slots, still, in, email, me, at, jeffknupp, com, more, learn, know, list, absence, how, do, just, anything, lists, better, functions, extended, common, sort, misunderstanding, generators, counting, cards, programmer, everything, knupp, reverse, info,
Text of the page (most frequently used words):
the (29), python (16), you (9), and (9), #function (7), #this (7), #with (6), #print (6), about (6), #read (5), #over (5), what (5), #list (5), #just (5), that (5), writing (4), exit (4), casino (4), out (4), code (4), line (4), older (4), for (4), func (4), #functions (4), been (4), jeff (4), yield (3), long (3), seems (3), most (3), reversed (3), but (3), which (3), more (3), blog (3), counting (3), ago (3), are (3), going (3), one (2), here (2), use (2), why (2), even (2), reverse (2), can (2), only (2), completely (2), few (2), pace (2), not (2), than (2), since (2), absence (2), extended (2), useful (2), idiomatic (2), programming (2), email (2), unreachable (2), your (2), know (2), should (2), bad (2), will (2), following (2), write (2), run (2), doesn (2), card (2), below (2), sequence (2), book (2), them (2), was (2), blackjack (2), how (2), term (2), tutoring (2), archives (2), tool (2), built (2), from (2), cards (2), lists (2), game (2), while (2), knupp (2), data (2), has (2), when (2), still, change, reliable, like, resulting, modern, slots, nyc, local, remote, languages, primary, method, abstraction, encapsulation, probably, written, content, producing, interesting, daughter, match, 2014, everything, already, heck, three, pythonic, months, learn, she, available, started, kindergarten, weeks, check, startups, com, jeffknupp, think, info, hundreds, equal, looking, holds, better, determine, there, two, try, figured, wonderfully, things, often, sort, iterate, seq, ways, hoping, say, items, depends, people, trying, time, affects, anything, developer, all, created, want, types, directly, examples, bang, analyzing, topic, readability, query, maintainability, then, importantly, makes, good, google, copyright, find, regularly, beating, gain, statistical, edge, thus, perfect, world, win, money, appealed, mainly, allure, its, players, own, literally, every, other, negative, expected, value, counter, really, beat, house, outline, help, used, cough, dealers, powered, blug, something, happened, new, jersey, rekindled, interest, offering, online, live, having, count, grown, minutes, atlantic, city, stranger, casinos, younger, learned, detail, affect, return, october, common, misunderstanding, generators, those, who, have, keeping, score, somewhat, especially, last, received, year, much, result, events, personal, life, discuss, regardless, consider, comeback, announcement, plan, days, somewhere, way, matter, executes, get, output, call, generator, object, 0x10e968a50, above, comment, within, nothing, after, because, point, program, def, iterators, maybe, explain, some, weird, behavior, 2018, treated, differently, programmer,
Text of the page (random words):
python programming jeff knupp python programmer blog about archives tutoring book everything i know about python learn to write pythonic code check out the book writing idiomatic python looking for python tutoring remote and local nyc slots still available email me at jeff jeffknupp com for more info how to do just about anything with python lists python s list is one of the built in sequence types i e it holds a sequence of things is a wonderfully useful tool i figured i d try to determine what people are most often trying to do with lists by analyzing google s query data on the topic and just bang out examples of how do i do x with a list in python reverse sort a list in python there are two ways to reverse a list in python and which one you use depends on what you want to do with the resulting reversed data if you re only going iterate over the items in the reversed list say to print them out use the python built in function reversed seq read on write better python functions in python like most modern programming languages the function is a primary method of abstraction and encapsulation you ve probably written hundreds of functions in your time as a developer but not all functions are created equal and writing bad functions directly affects the readability and maintainability of your code so what then is a bad function and more importantly what makes a good function read on extended absence for those who have been keeping score i ve been on somewhat of an extended absence especially since october of last year much of it was the result of events in my personal life which i ll not discuss here regardless consider this my comeback announcement i plan to return to writing regularly hoping to match the pace of 2014 or so which already seems so long ago heck writing idiomatic python is three months older than my older daughter and she just started kindergarten this a few weeks ago this blog is older than most startups but it s been a while since i ve been producing i think useful or interesting content at a reliable pace i m going to change that read on a common misunderstanding about python generators i received the following email a few days ago jeff it seems that you know about iterators maybe you can explain some weird behavior if you run the code below you will find that the function is treated differently just because it has a yield in it somewhere even if it s completely unreachable def func print why doesn t this line print exit within this function nothing should matter after this point the program should exit yield the exit line above will exit only if you comment out this line x func print x when i run the code i get the following output from the print call generator object func at 0x10e968a50 so what s going on here why doesn t that line in func print even if yield is completely unreachable it seems to affect the way the function executes read on counting cards with python having grown up about 20 minutes from atlantic city i m no stranger to casinos when i was younger but over 21 cough i learned to count cards a tool used by blackjack players to help them gain a statistical edge over the casino and thus in a perfect world win money over the long term it appealed to me mainly for the allure of beating the casino at its own game literally while every other game in the casino has a negative expected value over the long term the card counter really can beat the house i ll outline card counting in more detail below something just happened in new jersey that rekindled my interest in counting a casino offering blackjack with live dealers online read on older blog archives copyright 2018 jeff knupp powered by blug
|