DAY 2 : Python – Working with Tuples Today I explored tuples in Python and experimented with different operations such as indexing, slicing, concatenating two tuples, repeating elements, and even finding minimum and maximum values. Tuples are immutable, which means once created, they cannot be modified, and this immutability makes them very reliable for storing fixed collections of data. I found it interesting to see how combining tuples or repeating them creates new sequences without altering the original, and how built-in functions like min() and max() can instantly analyze them. This exercise reminded me that tuples might look simple, but they are powerful when working with structured, unchangeable data. Do you use tuples often in your Python projects, or do you mostly rely on lists? #Python #PythonProgramming #CodingJourney #LearningInPublic #DeveloperJourney
Anurag Parmar’s Post
More Relevant Posts
-
🚀 Python 3.14 introduces “t-strings” and here’s why they matter! If you’ve ever used f-strings in Python (f"Hello {name}"), you already know how convenient they are for string interpolation. But in Python 3.14, there’s a new player: t-strings (t"Hello {name}"). So, what’s the difference? 💡 f-strings: - Evaluate immediately at runtime. - Produce a regular string (str). - Great for logs, messages, and anything that’s safe to interpolate directly. 💡t-strings: - Introduced in Python 3.14. - Create a Template object instead of a plain string. - Interpolation happens later, when you explicitly substitute data. more details: https://lnkd.in/eQyTB_kQ #Python #Python314 #Programming
To view or add a comment, sign in
-
-
🚀 Day 4 of my 50 Days of Python Challenge! 🐍 Today’s focus was on Type Conversion in Python, an essential concept for handling different data types effectively. 📌 Topics I covered today: Implicit Conversion → Python automatically converts data types where needed Explicit Conversion (Type Casting) → using int(), float(), str(), etc. Common type conversion errors and how to fix them Practiced hands-on coding examples in VS Code 💻 Sample Practice Code: # Explicit Conversion Example a = "10" b = 5 sum = int(a) + b print(sum) # Output: 15 Learning with Shradha Khapra Ma’am’s Python course has been a game changer—her explanations make even tricky topics simple. 🙌 ✨ Day 4 done—step by step, getting closer to becoming confident with Python. #50DaysOfCode #Python #ShradhaKhapra #CodingChallenge #LearningJourney #Consistency
To view or add a comment, sign in
-
-
New in Python 3.14 — Template String Literals! Python 3.14 just introduced t-strings, a new way to handle string interpolation. Unlike f-strings, which evaluate instantly (like the f_user example in my screenshot), t-strings produce a Template object instead of a plain string. That Template keeps the full structure of your expression — literal text, embedded variables, and evaluated values — giving you more control and introspection. 💡 Why it matters: Since the structure of the string is preserved, you can safely handle user input and catch issues like SQL injection or XSS before the final text is created. #python
To view or add a comment, sign in
-
-
Did you know? In Python, list comprehensions aren’t just cleaner — they’re actually faster than traditional loops! ⚡ Let’s look at a quick comparison 👇 # Using a regular for loop squares = [] for i in range(1, 11): squares.append(i ** 2) # Using a list comprehension squares_comp = [i ** 2 for i in range(1, 11)] The result is the same — a list of perfect squares from 1 to 10. But the second version is shorter, more readable, and runs faster because it’s optimized internally in Python. 💡 List comprehensions are great for simple transformations — but if your logic becomes complex, a regular loop is more readable.
To view or add a comment, sign in
-
The newly released Python 3.14 brings support to free-threading, in simpler terms it lets python scripts get more done, faster, with less impact on the machine. If you're interested in trying the free-threading capabilities you will have to compile a version of python with the necessary --disable-gil flag. If that sounds daunting (it's not at all really) you may find my latest blog post useful https://lnkd.in/gYkQaT6g . #python #async #asynchronous The image used here is courtesy of : W.carter, CC BY-SA 4.0 <https://lnkd.in/gFSAXQpH>, via Wikimedia Commons
To view or add a comment, sign in
-
-
#Day94 of #100DaysOfCode 🚀 Today, I focused on Nested Lists and String Formatting in Python 🐍. 📘 Nested Lists: I explored how to create and access multi-dimensional lists — perfect for representing data like matrices or tables. It was interesting to see how indexing works within multiple layers of lists! 🧩 String Formatting: I learned different ways to format strings using techniques like f-strings, format(), and % formatting, which make displaying data more readable and dynamic. Every new concept is strengthening my foundation and helping me write cleaner, more efficient Python code. 💪✨ #Nxtwave #ccbp #100DaysOfCode #Python #NestedLists #StringFormatting #LearningEveryday #CodingJourney #ProblemSolving #Consistency
To view or add a comment, sign in
-
-
Commands in Python: 1)print- to print a message 2)type- to check the type or class of an object. 3)range- to generate a sequence of integers starting from 0 by default to n where n is not included in the generated numbers. 4)round- to round a number to a given precision in decimal digits. 5)input- to take input from the user. #HaveANiceDay #DataAnalytics #PythonBasics
To view or add a comment, sign in
-
✉️ Automating the Boring Stuff with Python! Imagine having to write 100 personalized letters one by one. That’s exactly where automation comes in and that’s what this project is all about.I built a Mail Merge Program using Python that reads a list of names from a file and automatically creates individual letters for each person customised and ready to send in seconds. Through this project, I learned how to: 1. Handle files and directories efficiently in Python. 2. Read, write, and manage data dynamically. 3. Use string manipulation and loops to automate repetitive tasks. 4. Apply simple scripting to build practical automation tools. It’s a small project, but one that truly shows the power of Python for real world automation. #Python #Automation #FileHandling #CodingProjects #LearningByBuilding #SoftwareDevelopment #100DaysOfCode #ProgrammingJourney
To view or add a comment, sign in
-
Today's #supersecretproject hint: Borrowed from the Zen of Python. There should be one - - and preferably only one - - obvious way to do it. It's self indulgent irony in Python. But it's not wrong for data engineering. #notdbt #dataengineering #RoR
To view or add a comment, sign in
-
🐍 Week 3: Python Foundations In Python, variables and data types are the building blocks of every program. They aren’t scary — they’re powerful! ✨ Common Data Types in Python: 🔢 int → Whole numbers (e.g., x = 10) ➗ float → Decimal numbers (e.g., pi = 3.14) 🔤 str → Text strings (e.g., name = "John") ✅ bool → True/False values (e.g., is_active = True) 💡 Tip: Python automatically detects the type when you assign a value — no need to declare it! 👉 Mastering these basics is your first step to solving real problems with Python. #LearnPython #Coding #PythonProgramming #DataScience
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