Chris Antony Correya (@antony_chris) header
Chris Antony Correya (@antony_chris) profile picture

https://teapaw.org/t.co/aaYYyk1win student at RSET'23๐ŸŽ“ | Python Developer ๐Ÿ | Passionate about Machine Learning ๐Ÿค– | Constantly exploring new possibilities in the world of tech

Joined September 2020
Photo by Chris Antony Correya (@antony_chris)Photo by Chris Antony Correya (@antony_chris)Photo by Chris Antony Correya (@antony_chris)Photo by Chris Antony Correya (@antony_chris)Photo by Chris Antony Correya (@antony_chris)Photo by Chris Antony Correya (@antony_chris)Photo by Chris Antony Correya (@antony_chris)Photo by Chris Antony Correya (@antony_chris)Photo by Chris Antony Correya (@antony_chris)Photo by Chris Antony Correya (@antony_chris)
Do you remember when you joined X? I do! #MyXAnniversary
30
Dose 16 - Sets in Python are like collections of unique elements. They're defined using curly braces or the set() constructor. For example: my_set = {1, 2, 3} ๐Ÿงต #Python #Sets #CodingCommunity
4
1
51
4/ And to find the difference between two sets: difference_set = set1 - set2 # or use set1.difference(set2)
22
3/ To find the intersection of two sets: intersection_set = set1 & set2 # or use set1.intersection(set2)
1
18
2/ To find the union of two sets: set1 = {1, 2, 3} set2 = {3, 4, 5} union_set = set1 | set2 # or use set1.union(set2) # union_set is now {1, 2, 3, 4, 5}
24
1/ Sets automatically remove duplicates, ensuring only unique values are stored. So, if you try to add a duplicate, it won't change the set.
35
Dose 15 - A tuple in Python is like a list, but immutable. You create it using parentheses (). Example: my_tuple = (1, 2, 3) ๐Ÿงต #PythonMastery ๐Ÿ“š #CodeLikeAPro ๐Ÿงฌ#LearnPython ๐Ÿ“– #CodingJourney ๐Ÿš€
4
65
2/ ๐Ÿ“œ Slicing extracts subsets. Example: subset = my_tuple[1:3] # (2, 3)
1
24
5/ ๐Ÿ“œ Check membership with 'in'. Example: check = 2 in my_tuple # True
13
4/ ๐Ÿ“œ Find element count using len(). Example: count = len(my_tuple) # 3
20
3/ ๐Ÿ“œ Concatenate tuples with "+". Example: combined_tuple = my_tuple + (4, 5) # (1, 2, 3, 4, 5)
21
1/ ๐Ÿ“œ Access elements by index (0-based). Example: first_element = my_tuple[0] # 1
32
It's #Friday and I'm ready for a *long* weekend! Who else is ready to relax, unplug, and forget all their responsibilities for a few days? ๐Ÿคฉ #TGIF
1
34
๐Ÿš€ Embrace new challenges, ๐Ÿ“š Learn from every experience, ๐Ÿ’ช Grow stronger each day! Let's conquer the world together! ๐ŸŒŽ๐Ÿ’ซ #Motivation #learning #Success
1
57
Dose 14 - ๐ŸA list is an ordered collection of items. These items can be of any data type: numbers, strings, even other lists! Lists are defined using square brackets [].๐Ÿงต #Python #Lists #PythonBasics #Coding101 #LearnToCode #CodeWithPython
4
1
81
4/ Example of List Operations: my_list = [1, 2, 3] my_list.append(4) # [1, 2, 3, 4] my_list.remove(2) # [1, 3, 4] length = len(my_list) # 3 subset = my_list[1:] # [3, 4]
1
38
3/ Common List Operations: Append: Add an item to the end of the list. Remove: Remove an item by its value. Len: Get the number of items in the list. Slicing: Get a subset of the list.
1
41
2/ Accessing Elements: You can access elements by their index. Lists are zero-indexed, so the first element is at index 0. Use square brackets to access elements.
1
36
1/ Creating a List: Create a list like this: my_list = [1, 2, 3, "Hello", "World"]
1
38