What really happens when we pass an integer vs a list to a function? In Python, passing an integer to a function does not behave the same way as passing a list. Let’s see why. Example 1: Passing an Integer def change_value(x): x = x + 10 return x num = 5 change_value(num) print(num) ➡️Output: 5 At first glance, this might seem confusing. Here’s what actually happens: 1. num references the integer object 5 in memory. 2. When we call change_value(num), the value 5 is passed to the function. 3. Inside the function, a new local variable x is created, referencing the same object 5. At this moment: num → 5 x → 5 Now comes the important part: x = x + 10 Integers in Python are immutable, meaning they cannot be modified after creation. So Python does not change the value 5. Instead: 1. It calculates 5 + 10. 2. It creates a new integer object 15. 3. It makes x reference this new object. Now: num → 5 x → 15 The original 5 is still in memory, unchanged. This is called rebinding (the variable x was redirected to a new object). And because we did not assign the returned value back to num: ❌ num = change_value(num) ➡️ num remains 5. Example 2: Passing a List def add_item(lst): lst.append(10) numbers = [1, 2, 3] add_item(numbers) print(numbers) ➡️Output: [1, 2, 3, 10] Why did this one change? Because lists are mutable. When we pass numbers to the function: 1. lst references the same list object. 2. When we call lst.append(10), we modify the same object in place. No new list is created. Before: numbers → [1, 2, 3] After: numbers → [1, 2, 3, 10] The variable still points to the same object, but that object was directly modified. This is called modification (in place). 💡 The Core Difference When passing data to a function in Python: • If the object is immutable (like int),the function cannot modify it. Any change creates a new object (rebinding). • If the object is mutable (like list),the function can modify the same object in place. That is why the integer stayed 5, while the list was successfully updated. Understanding this difference is essential to understanding how Python handles memory and variable references. #Python #SoftwareDevelopment #CodingTips #MachineLearning #AI
Passing Integers vs Lists in Python Functions
More Relevant Posts
-
🚀 DSA with Python – Bit Manipulation Practice Today I continued my Data Structures & Algorithms practice with Python, focusing on Bit Manipulation problems. For each problem, I first explored the brute force / generic approach and then implemented a more efficient solution using bitwise operations. Here are the concepts I practiced today 👇 🔹 1. Lonely Integer Problem: Given an array where every element appears twice except one, find the unique element. 💡 Key Bitwise Observations a ^ a = 0 a ^ 0 = a XOR is commutative and associative So when we XOR all elements, the duplicate numbers cancel each other and the unique element remains. Example: [5,1,4,4,5,3,1] → Lonely Integer = 3 Efficient idea: Iterate through the array and keep XORing elements. Time Complexity: O(n) 🔹 2. Longest Consecutive 1’s in Binary Goal: Find the maximum length of consecutive 1s in the binary representation of a number. 💡 Observation If we perform: n = n & (n << 1) Each iteration removes one consecutive layer of 1s The number of iterations equals the maximum consecutive 1s Example: n = 1101110 By repeatedly applying n & (n << 1), we count how many times it stays non-zero. Time Complexity: O(log n) 🔹 3. Swap Even and Odd Bits Swap every even-positioned bit with the adjacent odd-positioned bit. 💡 Approach 1️⃣ Extract even bits using mask 0xAAAAAAAA 2️⃣ Extract odd bits using mask 0x55555555 3️⃣ Shift them appropriately 4️⃣ Combine using OR Expression: ((n & 0xAAAAAAAA) >> 1) | ((n & 0x55555555) << 1) Time Complexity: O(1) Example: n = 181 Binary swap results in output: 122 🔹 4. Trailing Zeros in Binary Find the number of trailing zeros in the binary representation of a number. Example: n = 168 → 10101000 Trailing zeros = 3 💡 Observation Using the expression: (n ^ (n-1)) & n The result forms a power of two, and using log₂ we can determine the number of trailing zeros. 📚 Key Learning Bit manipulation helps in: ✔ Writing highly optimized solutions ✔ Reducing time complexity ✔ Solving many interview-level problems efficiently Practicing and documenting each concept step-by-step really helps in strengthening problem-solving skills. #DSA #Python #DataStructures #Algorithms #BitManipulation #BitwiseOperators #CodingPractice #ProblemSolving #SoftwareEngineering #PythonDeveloper #DeveloperJourney #InterviewPreparation #CodingInterview #LearnInPublic #BuildInPublic #TechLearning #Programming #ContinuousLearning #100DaysOfCode #DSA #Python #Algorithms #TimeComplexity #BigO #BackendDevelopment #SoftwareEngineering #ProblemSolving #CodingJourney #PythonDeveloper #BackendEngineer #SoftwareDeveloper #FullStackDeveloper #TechInterviews #CodingInterview #InterviewPreparation #ActivelyLooking #CareerGrowth #TechJobs #JobOpportunities #IndiaJobs #BangaloreJobs #HyderabadJobs #RemoteJobs #100DaysOfCode #ContinuousLearning #BuildInPublic #DeveloperJourney
To view or add a comment, sign in
-
-
Last week I shared a simple causal inference agent I built where Claude is the brain and Python is the hands (https://lnkd.in/gAUxCj8c). This week I want to pull back the curtain on how it actually works because understanding the architecture changed how I think about when agents are worth building at all. --- The agent has 3 layers: Layer 1: Tool Definitions Claude never sees your Python code. It sees JSON descriptions of what tools exist. Based on those descriptions + the data, it decides which tool to call and what arguments to pass. That's it. Layer 2: The Dispatcher When Claude says "call run_did," the dispatcher translates that into an actual Python function call. It also manages state — storing results, tracking where we are in the analysis, handling errors. Layer 3: Python Tools Each tool is a standalone module doing real statistical work — A/B test, DiD, Synthetic Control, report generation. Claude reasons about them. Python executes them. --- The benefits I'm seeing so far: · Clean separation — Claude handles reasoning, Python handles computation · Easily extensible — adding a new method is just adding a new tool · Auditable — every decision is logged and traceable · Testable — each tool works independently of the agent and can be changed/tested --- The biggest thing I'm still working through is identifying when an agent actually beats just writing a Python script? Current answer: Use a script when you already know which method to run. Use an agent when the right method depends on results you haven't seen yet – at the very least it can help reason a proper method that you can then explore. I'm genuinely still learning here, and the questions being asked of the agent are super basic and somewhat black and white. But one thing I'm fairly convinced of is that if you want consistent, reliable behavior from an agent, you need to give it structure — clear tool definitions, explicit guidelines in the system prompt, well-defined fallback logic. Without that, you're just asking a general LLM to figure it out, which is a bit scary and weaker in my opinion. Curious if others have found this to be true — or where you'd push back. #MarketingAnalytics #CausalInference #AgenticAI #DataScience #BuildingInPublic
To view or add a comment, sign in
-
-
🐍 Python Practice day 5– Here are some problems I solved today: ✅ Find the frequency of elements in a list ✅ Convert a list into a tuple ✅ Find common elements between two sets ✅ Remove duplicates from a list using a set ✅ Find union and intersection of two sets ✅ Create a dictionary from two lists (keys and values) ✅ Count frequency of characters in a string using a dictionary ✅ Merge two dictionaries ----------------------------------Day ----------------- Find the frequency of elements in a list. try: list1=[1,11,1,22,11,1,33,4,5,66,77,66,4,5] frequency_count={} for i in list1: if i in frequency_count: frequency_count[i]=frequency_count[i]+1 else: frequency_count[i]=1 print(frequency_count) except ValueError: print("Error occured") ==Tuples, Sets, Dictionaries == Convert a list into a tuple. list1=[1,2,3,4] tuple1=tuple(list1) print(tuple1) Find common elements between two sets. set1={1,2,3,3,4,4} set2={1,2,4,7} print(set1.intersection(set2)) Remove duplicates from a list using set. list1=[11,11,1,1,1,1,2,3,3] set1=set(list1) print(set1) list1=[11,11,1,1,1,1,2,3,3] unique_list=[] for i in list1: if i not in unique_list: unique_list.append(i) print(unique_list) Find union and intersection of two sets. set1={1,2,3,4,} set2={4,5,6,7,1} union1=set1.union(set2) inter_sec=set1.intersection(set2) print(union1) print(inter_sec) Create dictionary from two lists (keys and values) keys1=[1,2,3,4,5,6,7,8,9] values1=[9,8,7,6,5,4,3,2,1] dict_1={} for i in range(len(keys1)): dict_1[keys1[i]]=values1[i] print(dict_1) # Create dictionary from two lists (keys and values) keys1=[1,2,3,4,5,6,7,8,9] values1=[9,8,7,6,5,4,3,2,1] dict_1=dict(zip(keys1,values1)) print(dict_1) Count frequency of characters in a string using dictionary. str1="DpkWtmVMwwids.MMpAMLPlz" dict1={} for i in str1: if i in dict1: dict1[i]=dict1[i]+1 else: dict1[i]=1 print(dict1) # Merge two dictionaries. dict1={"Name":"Deepak", "Subject":"DataScience" } dict2={ "Designation":"DataEngineer", "Salary":"Ye batein btayi ni jati" } dict1.update(dict2) print(dict1) Working through these problems again helped reinforce concepts like: • Iteration and loops • Dictionary operations • Set theory in Python • Clean and Pythonic approaches like zip() and built-in methods #Python #Learning #Programming #DataScienceJourney #CodingPractice
To view or add a comment, sign in
-
✅ Week 2 of 180 — Python Lists are basically a Swiss Army knife! 🔪 Last session was Strings — fixed, immutable, locked. 🔒 Today? We unlocked something FAR more powerful. 🔓 Lists in Python — and honestly this changes EVERYTHING. 👇 🤔 So what IS a List? A List is an ordered, mutable collection of items that can hold multiple values — including different data types all in one place! fruits = ["apple", "banana", "cherry"] mixed = ["Alice", 30, True, 3.14] # yes, all in ONE list! 😲 ✅ 4 Key Properties: 📌 Ordered — every item has a fixed index position ✏️ Mutable — you can change, add or remove items freely 🔁 Allows Duplicates — same value can appear multiple times 🎲 Mixed Types — strings, ints, booleans all together! 📍 List Indexing — works exactly like Strings! nums = [10, 20, 30, 40, 50] # 0 1 2 3 4 ← positive index # -5 -4 -3 -2 -1 ← negative index print(nums[0]) # 10 → first item print(nums[-1]) # 50 → last item If you understood String indexing last session — congrats, you already know List indexing! 😄 ✂️ List Slicing — same syntax as Strings! nums = [10, 20, 30, 40, 50] print(nums[1:4]) # [20, 30, 40] → index 1 to 3 print(nums[::-1]) # [50, 40, 30, 20, 10] → REVERSED! 🔄 Python really said: "Learn it once, use it everywhere." 😂 🛠️ List Methods — the full toolkit: fruits = ["apple", "banana", "cherry"] fruits.append("kiwi") # adds to END fruits.insert(1, "mango") # inserts at index 1 fruits.remove("banana") # removes first occurrence fruits.pop(2) # removes & returns at index 2 fruits.sort() # sorts ascending fruits.reverse() # reverses the list fruits.clear() # removes ALL items new = fruits.copy() # creates a copy 🔥 The BIG difference from Strings: Strings → IMMUTABLE → methods return a NEW string Lists → MUTABLE → methods change the original list directly! # Strings - must reassign s = "hello" s = s.upper() # must save it back ✅ # Lists - changes happen in place! fruits.append("kiwi") # original list is updated automatically ✅ This tripped me up at first. Now it makes total sense! 😄 💡 Week 2 Summary so far: → Strings = read-only text with powerful methods 📖 → Lists = flexible, editable collections of anything 🗂️ Both use the same indexing and slicing — Python is beautifully consistent! 🐍 📅 Week 2 / 180 — Lists: DONE! ✅ Still going strong on my 6-Month GenAI & Agentic AI Certificate Program 🏛️ IIT Patna Certified print("Lists understood. Building momentum! 🚀") 💪 💬 Which List method do you use the most in your projects? Drop it below! 👇 ♻️ Repost if this helped you understand Python Lists better! #Python 🐍 #Lists #ListMethods #Week2 #GenAI 🤖 #IITPatna 🏛️ #LearningInPublic #100DaysOfCode #PythonBasics #DataStructures #CodingJourney #AgenticAI #NeverStopLearning 🚀 #BuildInPublic #AIForDevelopers
To view or add a comment, sign in
-
-
Day 27 --Lambda Functions in Python Lambda Functions are small, anonymous functions that can be written in a single line. They are useful when you need a quick function for a short period of time and don’t want to formally define it using def. 🔹 Basic Syntax lambda arguments: expression 🔹 Example add = lambda a, b: a + b print(add(5, 3)) Output: 8 Here, the lambda function takes two arguments and returns their sum. 🔹 Using Lambda with map() map()--->The map() function is used to apply a specific function to every item in an iterable such as a list, tuple, or set. It returns a map object, so we usually convert it to a list to see the result. MAP SYNTAX:-map(function, iterable) function → the function you want to apply iterable → the list, tuple, or other collection of items EXAMPLE : Using Lambda with map() numbers = [1, 2, 3, 4, 5] squared = list(map(lambda x: x**2, numbers)) print(squared) Output: [1, 4, 9, 16, 25] 🔹 Using Lambda with filter() FILTER()--->The filter() function is used to select elements from an iterable based on a condition. It returns only the elements that satisfy the condition. SYNTAX:-filter(function, iterable) function → a function that returns True or False iterable → the collection of items to filter EXAMPLE : Using Lambda with filter() numbers = [1, 2, 3, 4, 5, 6] even_numbers = list(filter(lambda x: x % 2 == 0, numbers)) print(even_numbers) Output: [2, 4, 6] EXAMPLE : Using Lambda with sorted() numbers =[1,2,3,4,5,6] sorted(numbers, key=lambda x:-x)# [6, 5, 4, 3, 2, 1] Key Points *Lambda functions are anonymous functions. *They are written in a single expression. *Commonly used with functions like map(), filter(), and sorted(). *Useful for short, simple operations. Learning concepts like this helps me understand how Python can write clean and concise code. Do you prefer lambda or regular def functions? Drop your answer below 👇 #Python #PythonLearning #CodingJourney #Programming
To view or add a comment, sign in
-
-
💡A Clear Guide to *args and **kwargs in Python When designing functions in Python, there are situations where the number of arguments passed to the function is unknown in advance. To handle such cases, Python provides two powerful features: *args and **kwargs. Understanding how they work can make your functions far more flexible. 1️⃣ *args • args is short for arguments. • *args allows a function to accept multiple positional arguments without specifying their number beforehand. • All additional positional arguments are automatically collected into a tuple. Example: def numbers(*args): print(args) ➡️ Function call: numbers(1, 2, 3, 4) ➡️ Inside the function: args = (1, 2, 3, 4) This means the function can handle any number of positional inputs. 2️⃣ **kwargs • kwargs stands for keyword arguments. • **kwargs allows a function to accept arguments that are passed with names. • These values are stored in a dictionary, where each key represents the argument name and each value represents the corresponding input. Example: def info(**kwargs): print(kwargs) ➡️ Function call: info(name="Ahmed", age=24) ➡️ Inside the function: kwargs = {'name': 'Ahmed', 'age': 24} This allows the function to handle a flexible number of named arguments. 🔹 Step-by-Step Example def func(a, *args, **kwargs): total = a for i in args: total += i for k, v in kwargs.items(): total += v return total print(func(1, 2, 3, x=4, y=5)) 1️⃣ Function Call func(1, 2, 3, x=4, y=5) Python distributes the arguments as follows: a = 1 args = (2, 3) kwargs = {'x': 4, 'y': 5} • The first value is assigned to a. • The remaining positional values are stored in args. • The named arguments are collected in kwargs. 2️⃣ Initializing the Total total = a So the initial value becomes: total = 1 3️⃣ Processing Positional Arguments for i in args: total += i Since: args = (2, 3) First iteration ➡️ total = 1 + 2 = 3 Second iteration ➡️ total = 3 + 3 = 6 Now: total = 6 4️⃣ Processing Keyword Arguments for k, v in kwargs.items(): total += v kwargs contains: {'x': 4, 'y': 5} Iterating through the dictionary provides the key-value pairs: ('x', 4) ('y', 5) First iteration ➡️ total = 6 + 4 = 10 Second iteration ➡️ total = 10 + 5 = 15 5️⃣ Returning the Result return total The function returns: 15 And the final output is: 15 🔹Summary • *args and **kwargs make Python functions more flexible. • *args collects extra positional arguments into a tuple, while **kwargs collects keyword arguments into a dictionary. • These features allow functions to handle a dynamic number of inputs and make code more reusable and adaptable. #Python #PythonProgramming #Coding #SoftwareDevelopment #AI #MachineLearning #LearningPython
To view or add a comment, sign in
-
🔥 Part-1: Tuples in Python (Complete Guide) 🔥 Tuples are one of the most important data structures in Python — simple, fast, and immutable! Let’s break it down in an easy and practical way 👇 📌 What is a Tuple? 👉 An ordered, immutable collection 👉 Allows duplicate values 👉 Written using parentheses () Example: fruits = ("apple", "orange", "cherry", "apple") print(fruits) # Output: ('apple', 'orange', 'cherry', 'apple') ✨ Ways to Create Tuples 🔹 1. Using Parentheses fruits = ("apple", "orange", "cherry") 🔹 2. Without Parentheses (Tuple Packing) numbers = 1, 2, 3, 4 print(type(numbers)) # Output: <class 'tuple'> 🔹 3. Single Element Tuple (Important ⚠️) single_tuple = ("apple",) print(type(single_tuple)) # Output: <class 'tuple'> 👉 Without comma, it becomes a string! 🎯 Accessing Elements 🔹 Indexing colors = ("red", "green", "blue", "orange") print(colors[0]) # red print(colors[-1]) # orange 🔹 Slicing nums = (10, 20, 30, 40, 50) print(nums[1:4]) # (20, 30, 40) ⚙️ Tuple Operations 🔹 Concatenation (+) print((1, 2) + (3, 4)) # (1, 2, 3, 4) 🔹 Repetition (*) print(("apple",) * 3) # ('apple', 'apple', 'apple') 🔁 Iteration in Tuple 🔹 Using for loop colors = ("red", "green", "blue") for color in colors: print(color) 🔹 Using while loop fruits = ("apple", "mango", "cherry") i = 0 while i < len(fruits): print(fruits[i]) i += 1 🛠️ Useful Methods & Functions 🔹 count() nums = (1, 2, 3, 2, 2) print(nums.count(2)) # 3 🔹 index() colors = ("red", "green", "blue") print(colors.index("green")) # 1 🔹 sorted() (returns list) nums = (3, 1, 2) print(sorted(nums)) # [1, 2, 3] 🔹 Built-in Functions numbers = (10, 20, 30, 40) print(len(numbers)) # 4 print(sum(numbers)) # 100 print(min(numbers)) # 10 print(max(numbers)) # 40 🎁 Packing & Unpacking 🔹 Unpacking coordinates = (10, 20, 30) x, y, z = coordinates print(y) # 20 🔹 Packing a = "Madhav" b = 21 c = "Engineer" tuple_pack = (a, b, c) print(tuple_pack) # ('Madhav', 21, 'Engineer') 🚀 Key Takeaways ✔ Tuples are immutable (cannot change) ✔ Faster than lists ✔ Useful for fixed data & security ✔ Supports indexing, slicing & iteration 💬 Stay tuned for Part-2 (Advanced Tuple Concepts) #Python #PythonProgramming #DataStructures #CodingTutorial #DataScience #SoftwareDevelopment
To view or add a comment, sign in
-
Day 23: Comprehensions — The "Pythonic" Way to Code ⚡ A Comprehension is a shorthand way to create a new collection (List, Dictionary, or Set) based on an existing one. It combines a for loop and an if statement into a single line. 1. List Comprehensions: The Standard Instead of creating an empty list and using .append(), you define the list's content in place. ❌ The Rookie Way: squares = [] for x in range(10): squares.append(x * x) ✅ The Pythonic Way: squares = [x * x for x in range(10)] 💡 The Engineering Lens: Comprehensions are actually slightly faster than for loops because they run at "C speed" inside the Python interpreter. However, if your comprehension is longer than one line, it’s better to use a regular loop for readability. 2. Adding Logic: The "if" Filter You can filter data while you build the list. Example: Create a list of even numbers only. evens = [n for n in range(20) if n % 2 == 0] 3. Dictionary Comprehensions You can build a key-value map just as easily. Example: Mapping names to their lengths. names = ["Alice", "Bob", "Charlie"] name_lengths = {name: len(name) for name in names} # Result: {'Alice': 5, 'Bob': 3, 'Charlie': 7} 4. Set Comprehensions Exactly like list comprehensions, but using {} to ensure all items are unique. Example: Getting unique file extensions from a list of files. files = ["test.py", "main.py", "data.csv", "script.py"] extensions = {f.split(".")[-1] for f in files} # Result: {'py', 'csv'} 💡 The "Clean Code" Rule of Thumb: Just because you can do it in one line doesn't mean you should. Do use it for: Simple transformations and filtering. Don't use it for: Complex logic with multiple if/else statements or "Nested Comprehensions" (a loop inside a loop). If another engineer has to read it three times to understand it, use a standard for loop instead. #Python #SoftwareEngineering #CleanCode #Pythonic #ProgrammingTips #LearnToCode #TechCommunity #DataScience #CodingEfficiency
To view or add a comment, sign in
-
Most Python crashes are not logic problems. They’re error handling problems. A missing file. Wrong data type. Invalid index. Division by zero. And suddenly your entire program stops. So I created a visual guide to Python Error Handling covering the most common errors developers face in real applications. Inside the guide: • SyntaxError – when Python can't understand your code • TypeError – mixing incompatible data types • NameError – using variables that don’t exist • ValueError – correct type but invalid value • IndexError – accessing elements outside list range • KeyError – dictionary key does not exist • ZeroDivisionError – dividing by zero • AttributeError – calling methods that don’t exist • ImportError – module or function not found • FileNotFoundError – incorrect file path or missing file • IndentationError – incorrect spacing in Python code • RuntimeError – issues occurring during execution • Logical Errors – code runs but produces wrong output Good engineers don’t just write code. They write code that fails safely. Because in real systems: Users give unexpected input. Files go missing. APIs fail. Data breaks assumptions. Error handling is what makes your software reliable in production. Save this guide as a reference for debugging Python programs. ---------------------------------------------------------------- 🎓 Want a structured plan for entire AI interviews? My AI Interview Mastery Bundle (13 courses) prepares you for ML, GenAI, LLM, and Agentic AI roles with real interview questions and system thinking. Start preparing the right way. Enroll now using link below. https://lnkd.in/gqFkWZd4
To view or add a comment, sign in
-
In Python, what is the difference between mutable and immutable variables? And how does this affect data handling inside functions? 🔹 First: What does Mutable vs Immutable mean? In Python, everything is an object. The key difference is whether the object can be changed after it is created. ✅ Immutable Objects An immutable object cannot be modified after creation. If you try to change it, Python creates a new object instead. Examples: • int • float • str • tuple Example: y = 3.5 y = y * 2 print(y) ➡️ Output: 7.0 Here, Python does not modify 3.5. It creates a new float object 7.0 and reassigns y to it. ✅ Mutable Objects A mutable object can be modified after creation without creating a new object. Examples: • list • dict • set Example: list = [1, 2, 3] list.append(4) print(list) ➡️ Output: [1, 2, 3, 4] Here, Python modifies the same list object in memory. 🔎 How Does This Affect Functions? This difference becomes very important when passing objects to functions. 1️⃣ Case 1: Immutable Inside a Function def change_text(text): text = text + "!" word = "Hi" change_text(word) print(word) ➡️ Output: Hi 🔹Explanation • word = "Hi" creates a string object "Hi" in memory. • When we call change_text(word), the function receives a reference to the same object. • Inside the function, text = text + "!" does NOT modify "Hi" because strings are immutable. • Python creates a new string "Hi!" and makes text refer to it. • The original variable word still refers to "Hi". ➡️ That’s why print(word) outputs "Hi". 2️⃣ Case 2: Mutable Inside a Function def remove_last(numbers): numbers.pop() values = [10, 20, 30] remove_last(values) print(values) ➡️ Output: [10, 20] 🔹Explanation • values = [10, 20, 30] creates a list object in memory. • When we call remove_last(values), the function receives a reference to the same list. • Inside the function, numbers.pop() removes the last element from the same list object in memory. • Since lists are mutable, Python modifies the existing object instead of creating a new list. • Both values and numbers point to that same list, so the change appears outside the function as well. ➡️ That’s why print(values) outputs [10, 20]. 🔎 Core Concept • Immutable objects cannot be changed in place. • Mutable objects can be modified directly. • When passing mutable objects to functions, changes inside the function affect the original data. • When passing immutable objects, changes inside the function do not affect the original variable. 🔹Why This Matters in AI & Analytics When working with datasets and AI pipelines, modifying a mutable object can unintentionally change your original data. Understanding mutability helps you avoid bugs and write more predictable, reliable code. #Python #Programming #AI #DataScience #MachineLearning #AIandAnalytics
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
👏👏👏❤️