Python

Home-Python
Python2020-12-31T22:53:05+00:00
PYTHON

Python Class

By |July 17th, 2021|

Anatomy A python class is defined using the 'class' keyword followed by the class name and a colon.  Instance variables and methods will

Parsing JSON with Python

By |February 6th, 2021|

Using the json Library The loads method in the json library returns a dictionary for anything in curly brackets and a list for

Parsing XML with Python

By |January 23rd, 2021|

Using the ElementTree library in Module xml Example 1: Selecting elements with findall import xml.etree.ElementTree as ET input = '''<stuff> <users> <user x="x1">

Python HTTP

By |January 18th, 2021|

Using Sockets The following is similar to a telnet session, where we first connect to the server, we submit a GET request, and

Regular Expressions

By |January 3rd, 2021|

To use regular expressions, import re. Use re.search() to see if a string matches a regular expression. Use re.findall() to extract strings that

Tuple

By |January 2nd, 2021|

A tuple is an immutable list of values.  Iteration and indexes work the same way as lists, but they cannot be modified.  While

Dictionary

By |January 1st, 2021|

A dictionary is a collection that stores data in key/value pairs and is equivalent to a java map.  Keys can be of any

Lists

By |January 1st, 2021|

A list is an ordered collection that can contain elements of any different type, including other lists.  Iteration on a list can be

Text Files

By |January 1st, 2021|

This entry provides code to read text files in python.  The open function returns a handle that can be treated as a sequence

Python Strings

By |December 31st, 2020|

A string is an inmutable sequence of characters.  This post covers string operations, including iteration, slicing, concatenation, comparison, string methods, and functions.  

FROM THE BOARD
Apple Forum
TUTORIALS & GUIDES
Go to Top