Creating and indexing lists in Python

List is the simplest type of data structure in Python programming. A list is used to store a collection of elements of same type (numeric, string, etc.). In Python, a pair of brackets [] indicates the data object is a list type. For example, the following two statements create two lists, in which one is numeric and the other is of string type.

Creating data frames in R using data.frame()

Data frames are the most widely used data structures in R programming. Unlike each element in vector/matrix/array must have same data mode, a data frame can store data elements with different mode or type in one object. For example, a data frame of family information can have numeric (e.g. age, income), character (e.g. name), and logical (work/not work) data types. Data frames in R act somewhat similar as a spredsheet in Microsoft Excel, where each row represents each observation or subject and each column refers to each variable or attribute.