Prince Kumarprincechx.hashnode.dev·Jul 12, 2024Python Basics: Lists, Indexing, List Methods, and TuplesLists What is a List? A list in Python is a collection of items that are ordered and changeable. Lists allow duplicate members. Creating a List # Creating a list of fruits fruits = ["apple", "banana", "cherry"] Indexing in Lists Indexing allo...Discuss·1 likePython
Asaf Huseynasafhuseyn.hashnode.dev·Jul 6, 2024Are All Swift Functions Actually Returning Tuples?Contents Introduction The Genesis of the Theory Unraveling the Tuple Mystery The Swift Type System: A Deeper Dive Void in Swift vs. Other Languages Implications and Reflections Conclusion References Introduction Swift, known for its express...DiscussSwift
Varsha VMvarshv.hashnode.dev·May 25, 2024Python Data StructuresOverview Data Structures are a way of organizing data so that it can be accessed more efficiently depending upon the situation. Lists A list is any list of data items, separated by commas, inside square brackets. They are ordered, mutable, and allo...Discuss·10 likes·52 readsdictionary methods
Amanda Ene Adoyilonercode.hashnode.dev·May 11, 2024All About the Other Python Iterables: Tuples and SetsWelcome to another post on iterables. In this post we would be talking about Tuples and Sets. Each data bundle houses other data types like numbers, strings and other iterables just like list do (Remember lists?) . They do differ however in terms of ...DiscussPython 3
Raymond Broomemondo.hashnode.dev·Feb 17, 2024Using a Pair/Tuple type in JavaAt times I find myself wanting to use a type such as tuple in Python (or Scala) or the std::pair from C++ to represent a listing of homogenous or heterogenous values e.g. coordinates (x,y), a value along with its frequency ('b',2) or some other type ...Discuss·36 readsJava
Osaf Ali Sayedosafalisayed.com·Feb 11, 2024Day 4 - Any Type and TuplesAny type in TypeScript allows a variable to have any datatype. We revert to JavaScript if you use any keyword. // A variable of type any can take any value let x: any; x = 10; x = false; x = "string"; // We can put all these values because any type a...Discuss·1 likeLearn with me TypeScript Crash Course Seriestuples
Shashank Shetshashankshet.hashnode.dev·Dec 13, 2023Mastering Tuples in Python: Unveiling the Power of ImmutabilityIn this advanced Python exploration, we turn our attention to a gem in the Python collection family: Tuples. As ordered and immutable collections, tuples play a unique role in the Pythonic orchestra. Join us as we unravel the intricacies of tuples an...DiscussPython 3
maham tariqmahamtariq58.hashnode.dev·Nov 24, 2023Tuples and SetsTuples Tuples are in-built data structures in Python that are similar to lists, except that tuples are immutable (i.e., contents cannot be changed). Creating a Tuple # empty tuple t = () # tuple with single item t = ('hello',) # Homogeneous tuple ...DiscussPython Essentialsset comprehension
Elucian MoiseforProgramming Languagessagecode.hashnode.dev·Oct 27, 2023Python TuplesHere is a summary of tuples in Python: Tuples are immutable ordered sequences of objects in Python. Once a tuple is created, you cannot change its elements. Syntax: A tuple is created by placing all the items (elements) inside parentheses ( ), separa...DiscussPython SyntaxPython
ESlavin1808eslavin.hashnode.dev·Sep 30, 20233.2 TuplesIn Python, a tuple is an ordered collection of elements, enclosed in parentheses and separated by commas. Tuples are similar to lists, but they are immutable, meaning that once a tuple is created, its elements cannot be modified. Tuples are commonly ...Discuss·30 readsUnlocking the Python Mysteriestuples