Python Programming: The Complete Guide to Learn Python for Data Science, AI, Machine Learning, GUI and More With Practical Exercises and Interview Questions by Ayden Nicholas
Author:Ayden, Nicholas [Ayden, Nicholas]
Language: eng
Format: epub, azw3
Published: 2019-11-07T16:00:00+00:00
Indexing, trimming and other tuple operations
Access to tuple elements, element extraction and operations are performed analogously to strings. Let's look at several examples:
>>> b = (3, 4, 5, 'a')
>>> b [0]
3
>>> b [-1]
'to'
>>> b [0: 3]
(3. 4. 5)
>>> t = ('the', 'tuples', 'are', 'immutable')
>>> t [0]
'the'
>>> t [1] = 'lists'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
The static or immutable characteristic of the tuples is observed, as are the strings. We can include tuples within tuples and concatenate and repeat them, such as string,
>>> b = (3, 4, 5, 'a')
>>> c = (b, 2)
>>> b + c
(3, 4, 5, 'a', (3, 4, 5, 'a'), 2)
>>> 3*b
(3, 4, 5, 'a', 3, 4, 5, 'a', 3, 4, 5, 'a')
Download
Python Programming: The Complete Guide to Learn Python for Data Science, AI, Machine Learning, GUI and More With Practical Exercises and Interview Questions by Ayden Nicholas.azw3
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12399)
Hello! Python by Anthony Briggs(9751)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9637)
The Mikado Method by Ola Ellnestam Daniel Brolund(9632)
Dependency Injection in .NET by Mark Seemann(9163)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8148)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7653)
Grails in Action by Glen Smith Peter Ledbrook(7565)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7390)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6279)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(6234)
Microservices with Go by Alexander Shuiskov(6001)
Practical Design Patterns for Java Developers by Miroslav Wengner(5915)
Test Automation Engineering Handbook by Manikandan Sambamurthy(5882)
Angular Projects - Third Edition by Aristeidis Bampakos(5221)
Kotlin in Action by Dmitry Jemerov(4918)
The Art of Crafting User Stories by The Art of Crafting User Stories(4800)
NetSuite for Consultants - Second Edition by Peter Ries(4763)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(4574)
