Winter Arc 22/30 ❄️ Today's challenge: Python Automation Coded a Python program that automates the task of organizing files in a directory by their file extensions. It sorts various files into their "file-type" folder(example; text files into text -Scans the specified directory for files. -Creates subfolders for different file types if they don't exist. -Moves each file to the appropriate category based on its extension. -Skips the script itself to avoid moving it. -I also have included error handling for non-existent directories. This exercise helped me to revise various concepts of python.✅ MATRIX.JEC #WinterArc #Python
Python Automates File Organization
More Relevant Posts
-
👀 How do you print a list using just ONE single line ❓ ❓ ❓ 🐍 Python has simple lists with this format: nameOfList = [value1, value2, value3] If you want to print all the values in the list, perhaps the first thing you think of is that you'll need a loop ➿. But what if you want all the values displayed on "a single line"? You can also use a loop with some modifications. However, Python has the unpacking operator ❗ ❗ ❗ Place the character * at the beginning of your list. It automatically "unpacks" all the contents of your list into a single line! #Python #IA #programming
To view or add a comment, sign in
-
-
💥 Day 13 of my 70-Day Python Learning Challenge 💥 Today, I learned about logical operators, identity operators, and membership operators in Python. Logical operators (and, or, not) are used to combine conditions. Membership operators (in, not in) are used to check if a value exists within a sequence, like a string or list. I also learned the difference between is and ==. == is used to compare values and checks if two variables have the same content, while 'is' is used to compare identity and checks if both variables point to the same object in memory. These operators help make programs more flexible and intelligent by improving how decisions are made. #latepost #70dayschallenge #python
To view or add a comment, sign in
-
Day 47 – Check Anagrams in Python: For Day 47, you implemented an anagram checker The program compares two strings by converting them to lowercase, sorting their characters, and checking if both results match. This is a clean and Pythonic way to solve anagrams. String methods (lower) sorted() function Functions & user input Boolean logic GitHub Code: https://lnkd.in/gYeGtqcQ #Day47 #100DaysOfCode #Python #Anagram #StringProblems #ProblemSolving #DailyCoding #LearningByDoing
To view or add a comment, sign in
-
-
📌 Python Tuple – Accessing Items Using Index In this post, I learned how to access elements from a tuple using index numbers 🧩 ✔️ Index starts from 0 in Python ✔️ mytuple[0] → First element ✔️ mytuple[1] → Second element ✔️ len() gives the total number of items ✔️ Last index = length - 1 ✔️ Accessing an invalid index gives IndexError 📖 Example: If length = 4 → Last index = 3 So, mytuple[3] is valid, but mytuple[4] gives an error ❌ Practicing every day to improve my Python skills 💻✨ #Python #PythonLearning #Tuple #DataStructures #CodingJourney #LearningInPublic #Programming #TechSkills
To view or add a comment, sign in
-
-
Are you using Python tuples correctly? 🐍 Many beginners confuse **lists and tuples** — but one small difference changes everything. A tuple is: • Ordered(elements keep their position) • Immutable (cannot be changed after creation) • Allows duplicates Example 👇 python coordinates = (10, 20, 30) print(coordinates[1]) Because tuples are immutable, they are safer for storing: ✔ Fixed data ✔ Configuration values ✔ Constants ✔ Data that shouldn’t change They are also slightly faster than lists due to immutability. If your data should not be modified, a tuple is often the better choice. #Python #PythonBasics #DataTypes #Coding #LearningPython
To view or add a comment, sign in
-
-
🚀 Python Mini Project | Working with Time Module 🐍 Today I practiced Python’s time module and created a simple program that displays the current system time ⏰ 🔹 What this program does: ✔ Prints current time in HH:MM:SS format ✔ Extracts hours, minutes, and seconds separately ✔ Uses time.strftime() for formatting 📌 This helped me understand how Python handles real-time data and time formatting. 🔗 Code available on GitHub:https://lnkd.in/guM28yqB 💬 Feedback and suggestions are welcome! #Python #PythonProgramming #LearningPython #TimeModule #BeginnerProject #CodingJourney #GitHub #LinkedInLearning
To view or add a comment, sign in
-
⚡ Python Day 2: f-strings = Formatted Superpowers! Just learned how f-strings make Python string formatting elegant and powerful: ✨ What I can now do: • Embed variables directly: `f"Hello, {name}!"` • Perform math in strings: `f"Total: ${price * quantity:.2f}"` • Debug easily: `f"{variable=}"` shows name AND value • Format numbers professionally: `f"${amount:,.2f}"` Key takeaway: f-strings are readable, fast, and eliminate messy concatenation. #Python #Day2 #FStrings #Programming #CodingChallenge #LearnToCode
To view or add a comment, sign in
-
-
Revised Python Dictionary concepts with hands-on examples. Learned about key–value pairs, immutability of keys, and flexible value types. Practiced adding, updating, deleting, and accessing elements efficiently. Worked with methods like update(), setdefault(), fromkeys(), and copy(). Explored dictionary creation using zip and string parsing. This strengthened my understanding of data handling in Python. #Python #Dictionary #DataStructures #PythonLearning #CodingJourney #Programming
To view or add a comment, sign in
-
Python String Tutorial: Indexing, Slicing, Raw Strings, and Escape Sequences 4 Python String Tricks You Need to Know 🧵 Writing clean code is about knowing the "shortcuts" that the pros use. I just dropped a video covering the essentials of string manipulation that will save you hours of debugging. The Highlights: ✅ Raw Strings (r""): Essential for handling backslashes without the headache. ✅ Slicing Syntax: Master the [start:stop:step] logic. ✅ Reverse Strings: The cleanest way to reverse data in Python. ✅ Formatting: Using escape sequences to keep your output readable. Watch the tutorial: https://lnkd.in/drqM_mHD Krunal Triveddi
Master Python Strings: Slicing, Indexing & Escape Sequences Explained #python #pythonforbeginners
https://www.youtube.com/
To view or add a comment, sign in
-
Python String Tutorial: Indexing, Slicing, Raw Strings, and Escape Sequences 4 Python String Tricks You Need to Know 🧵 Writing clean code is about knowing the "shortcuts" that the pros use. I just dropped a video covering the essentials of string manipulation that will save you hours of debugging. The Highlights: ✅ Raw Strings (r""): Essential for handling backslashes without the headache. ✅ Slicing Syntax: Master the [start:stop:step] logic. ✅ Reverse Strings: The cleanest way to reverse data in Python. ✅ Formatting: Using escape sequences to keep your output readable. Watch the tutorial: https://lnkd.in/dVUs8i2t Krunal Triveddi
Master Python Strings: Slicing, Indexing & Escape Sequences Explained #python #pythonforbeginners
https://www.youtube.com/
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