Lists are ordered collection object type. Lists can contain any sort of object: numbers, strings, tuple,dictionary and even other lists. Lists are mutable objects. How to copy or clone list in Python 1. Create List >>> L=[‘Python’,’R’,’SAS’,’SPSS’,’Java’,’Data Analytics’,[1,2,3,4],10,3.14]

## Posts Tagged ‘List’

## How to check list is empty or not in Python

If list contains zero elements or length of list is zero is known as empty list. We can check whether list is empty or not using below methods 1. Declare empty list a=[] #Empty list type(a) 2. Check list is empty or not by using len function of list.

## Apply functions in R

Apply functions are alternatives to Loops in R. In this tutorial, we are going to discuss about apply and apply family functions. We are going to explain following apply functions with examples: apply() sapply() lapply() mapply() vapply() rep() rapply() tapply() apply Function:

## Difference between Lists and Tuples in Python

List Tuple List objects are mutable objects. Which means can be changed after its created Tuple objects are immutable objects. Which means can’t be changed after its created Lists have order Tuple has structure Iterating the list is slower Iterating the tuple is faster List objects are not used as keys for the dictionary Tuple […]

## Convert List to Vector in R

A list can be converted to a Vector in R. So that the elements of the vector can be used for further manipulation. All arthimetic operations o vectors can be applied after the the list is converted to vectors. We can convert list to vector using unlist() function. It takes list as input and produces […]