Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Practical Time Series Analysis

You're reading from  Practical Time Series Analysis

Product type Book
Published in Sep 2017
Publisher Packt
ISBN-13 9781788290227
Pages 244 pages
Edition 1st Edition
Languages
Authors (2):
Avishek Pal Avishek Pal
Profile icon Avishek Pal
PKS Prakash PKS Prakash
Profile icon PKS Prakash
View More author details
Toc

Basic data types


Python supports basic numeric data types such as int, long, and float, just like all major programming languages. None represents a null pointer in Python.

Strings are sequential data types in Python. Other sequential data types that are commonly used in Python are lists and tuples. The difference between a list and tuple is that the former is mutable while the latter is an immutable type. Therefore, the interpreter would throw an error if you try to modify a tuple. Let's dig a little deeper into lists and tuples.

List, tuple, and set

A list is a collection of elements. An element can be of any data type and a list can contain elements of different data types. A list has several important functions such as append, extend, insert, index, pop, and few others. The following table summarizes the functionality of these functions:

Function name

Functionality

append

Adds a new element to the end of the list.

extend

Adds new elements from an iterable. The members of the iterable element...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime}