<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Python on BradCypert.com</title>
    <link>https://www.bradcypert.com/tags/python/</link>
    <description>Recent content in Python on BradCypert.com</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 27 Dec 2022 22:25:45 -0500</lastBuildDate>
    <atom:link href="https://www.bradcypert.com/tags/python/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Python Length of a List</title>
      <link>https://www.bradcypert.com/python-length-of-a-list/</link>
      <pubDate>Mon, 17 Feb 2020 00:00:00 +0000</pubDate>
      <guid>https://www.bradcypert.com/python-length-of-a-list/</guid>
      <description>&lt;p&gt;When writing Python, it’s fairly common to find yourself working with lists of data. Usually, you’ll also find yourself trying to figure out just how my items are in that list. Thankfully, in Python, finding the length of a list is fairly easy.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;my_list &lt;span style=&#34;color:#ff79c6&#34;&gt;=&lt;/span&gt; [&lt;span style=&#34;color:#bd93f9&#34;&gt;1&lt;/span&gt;,&lt;span style=&#34;color:#bd93f9&#34;&gt;2&lt;/span&gt;,&lt;span style=&#34;color:#bd93f9&#34;&gt;3&lt;/span&gt;,&lt;span style=&#34;color:#bd93f9&#34;&gt;4&lt;/span&gt;,&lt;span style=&#34;color:#bd93f9&#34;&gt;5&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#8be9fd;font-style:italic&#34;&gt;print&lt;/span&gt;(&lt;span style=&#34;color:#f1fa8c&#34;&gt;&amp;#34;The length of this list is:&amp;#34;&lt;/span&gt;, &lt;span style=&#34;color:#8be9fd;font-style:italic&#34;&gt;len&lt;/span&gt;(my_list))&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The key takeaway here is &lt;a href=&#34;https://docs.python.org/3/library/functions.html#len&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;the &lt;code&gt;len&lt;/code&gt; function&lt;/a&gt;&#xA; &lt;a href=&#34;https://docs.python.org/3/library/functions.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;that’s built into Python&lt;/a&gt;&#xA;. No external library required! The &lt;code&gt;len&lt;/code&gt; function takes in a sequence or a collection and returns the number of items contained within. This means that the length function has an &lt;a href=&#34;https://en.wikipedia.org/wiki/Arity&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;arity&lt;/a&gt;&#xA; of 1 and should only be passed one argument. The return value is always an number representing the count of items contained within the parameter that’s provided to the function.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why I Switched from Python to Clojure</title>
      <link>https://www.bradcypert.com/why-i-switched-from-python-to-clojure/</link>
      <pubDate>Mon, 18 Jul 2016 00:00:00 +0000</pubDate>
      <guid>https://www.bradcypert.com/why-i-switched-from-python-to-clojure/</guid>
      <description>&lt;p&gt;First – a bit of background. When I first started to learn programming, I started with a course in high school that focused on Java. From there, I decided I wanted to work for a start-up and I had to learn Python (I was naive). I started playing around with Python and it just felt right – at first. I spent some more time with it and started to realize that I needed something more. Here’s a brief list of the reasons why I switched from Python to Clojure.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Building a Jenkins CLI with Python</title>
      <link>https://www.bradcypert.com/building-a-jenkins-cli-with-python/</link>
      <pubDate>Mon, 20 Oct 2014 00:00:00 +0000</pubDate>
      <guid>https://www.bradcypert.com/building-a-jenkins-cli-with-python/</guid>
      <description>&lt;h1 id=&#34;jenkins-please&#34;&gt;Jenkins, please.&lt;/h1&gt;&#xA;&lt;p&gt;For those of you who don’t know, Jenkins is a continuous-integration (often refered to as CI) server based heavily off of Hudson. In-fact, they were one in the same before Oracle purchased Hudson, but a community fork happened and now Jenkins is the open-source version. There’s other CI Servers out there, Codeship and Travis CI are two that come to mind, but I was introduced to Jenkins at work, and have been using it ever since.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Writing a RESTful API in Flask &amp; SQLAlchemy</title>
      <link>https://www.bradcypert.com/writing-a-restful-api-in-flask-sqlalchemy/</link>
      <pubDate>Sat, 04 Oct 2014 00:00:00 +0000</pubDate>
      <guid>https://www.bradcypert.com/writing-a-restful-api-in-flask-sqlalchemy/</guid>
      <description>&lt;h2 id=&#34;first-things-first&#34;&gt;First Thing’s First&lt;/h2&gt;&#xA;&lt;p&gt;Why would we write this in Python? There’s already rails, spring, and the mean stack which can do the same thing. Let’s consider what Python gives us out of the box. Out of all the languages I’ve touched, it definitely has the easiest learning curve. The syntax is beautiful, and the “batteries included” principle of python just helps you get your server up very quick. Install python, find your dependencies, get coding.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
