<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vishwa K</title>
    <description>The latest articles on DEV Community by Vishwa K (@vishwa_k).</description>
    <link>https://dev.to/vishwa_k</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3946092%2F7d331722-c7d7-45d2-ab8f-fc823e7f5e23.png</url>
      <title>DEV Community: Vishwa K</title>
      <link>https://dev.to/vishwa_k</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vishwa_k"/>
    <language>en</language>
    <item>
      <title>Understanding Sets in Python</title>
      <dc:creator>Vishwa K</dc:creator>
      <pubDate>Fri, 05 Jun 2026 01:15:20 +0000</pubDate>
      <link>https://dev.to/vishwa_k/understanding-sets-in-python-3645</link>
      <guid>https://dev.to/vishwa_k/understanding-sets-in-python-3645</guid>
      <description>&lt;p&gt;1Understanding Sets in Python: A Beginner's Guide&lt;/p&gt;

&lt;p&gt;Python provides several built-in data structures, and one of the most useful among them is the set. A set is an unordered collection of unique elements. It is commonly used when you need to remove duplicates or perform mathematical set operations.&lt;/p&gt;

&lt;p&gt;What is a Set?&lt;/p&gt;

&lt;p&gt;A set stores unique values only. If duplicate values are added, Python automatically removes them.&lt;/p&gt;

&lt;p&gt;numbers = {1, 2, 3, 3, 4, 4, 5}&lt;br&gt;
print(numbers)&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;{1, 2, 3, 4, 5}&lt;/p&gt;

&lt;p&gt;As you can see, the duplicate values are removed automatically.&lt;/p&gt;

&lt;p&gt;Creating a Set&lt;/p&gt;

&lt;p&gt;You can create a set using curly braces "{}".&lt;/p&gt;

&lt;p&gt;fruits = {"apple", "banana", "orange"}&lt;br&gt;
print(fruits)&lt;/p&gt;

&lt;p&gt;Adding Elements&lt;/p&gt;

&lt;p&gt;Use the "add()" method to insert a new element.&lt;/p&gt;

&lt;p&gt;fruits.add("mango")&lt;br&gt;
print(fruits)&lt;/p&gt;

&lt;p&gt;Removing Elements&lt;/p&gt;

&lt;p&gt;Python provides two methods for removing elements:&lt;/p&gt;

&lt;p&gt;fruits.remove("banana")&lt;/p&gt;

&lt;p&gt;or&lt;/p&gt;

&lt;p&gt;fruits.discard("banana")&lt;/p&gt;

&lt;p&gt;The difference is that "discard()" does not raise an error if the item is not present.&lt;/p&gt;

&lt;p&gt;Checking Membership&lt;/p&gt;

&lt;p&gt;Sets provide very fast lookup operations.&lt;/p&gt;

&lt;p&gt;if "apple" in fruits:&lt;br&gt;
    print("Apple exists")&lt;/p&gt;

&lt;p&gt;Set Operations&lt;/p&gt;

&lt;p&gt;Union&lt;/p&gt;

&lt;p&gt;Combines two sets.&lt;/p&gt;

&lt;p&gt;a = {1, 2, 3}&lt;br&gt;
b = {3, 4, 5}&lt;/p&gt;

&lt;p&gt;print(a | b)&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;{1, 2, 3, 4, 5}&lt;/p&gt;

&lt;p&gt;Intersection&lt;/p&gt;

&lt;p&gt;Returns common elements.&lt;/p&gt;

&lt;p&gt;print(a &amp;amp; b)&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;{3}&lt;/p&gt;

&lt;p&gt;Difference&lt;/p&gt;

&lt;p&gt;Returns elements present in the first set but not in the second.&lt;/p&gt;

&lt;p&gt;print(a - b)&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;{1, 2}&lt;/p&gt;

&lt;p&gt;Real-World Example&lt;/p&gt;

&lt;p&gt;Removing duplicate email addresses:&lt;/p&gt;

&lt;p&gt;emails = [&lt;br&gt;
    "&lt;a href="mailto:user1@gmail.com"&gt;user1@gmail.com&lt;/a&gt;",&lt;br&gt;
    "&lt;a href="mailto:user2@gmail.com"&gt;user2@gmail.com&lt;/a&gt;",&lt;br&gt;
    "&lt;a href="mailto:user1@gmail.com"&gt;user1@gmail.com&lt;/a&gt;"&lt;br&gt;
]&lt;/p&gt;

&lt;p&gt;unique_emails = set(emails)&lt;br&gt;
print(unique_emails)&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;{'&lt;a href="mailto:user1@gmail.com"&gt;user1@gmail.com&lt;/a&gt;', '&lt;a href="mailto:user2@gmail.com"&gt;user2@gmail.com&lt;/a&gt;'}&lt;/p&gt;

&lt;p&gt;Advantages of Sets&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatically removes duplicates&lt;/li&gt;
&lt;li&gt;Fast searching and membership testing&lt;/li&gt;
&lt;li&gt;Supports mathematical operations like union and intersection&lt;/li&gt;
&lt;li&gt;Easy to work with large collections of unique data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Conclusion&lt;/p&gt;

&lt;p&gt;Sets are one of Python's most powerful data structures for handling unique data efficiently. Whether you're removing duplicates, checking membership, or performing mathematical operations, sets provide a clean and efficient solution.&lt;/p&gt;

&lt;p&gt;If you're new to Python, learning sets early will help you write cleaner and faster code.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Lists in Python</title>
      <dc:creator>Vishwa K</dc:creator>
      <pubDate>Tue, 02 Jun 2026 16:12:07 +0000</pubDate>
      <link>https://dev.to/vishwa_k/lists-in-python-2i0i</link>
      <guid>https://dev.to/vishwa_k/lists-in-python-2i0i</guid>
      <description>&lt;p&gt;Today, I learned about Lists in Python, one of the most important and commonly used data structures in programming. Before today's class, I knew that variables could store values, but I did not know how to store multiple values in a single variable efficiently. Learning about lists helped me understand how programmers manage collections of data in a simple and organized way.&lt;/p&gt;

&lt;p&gt;A list is a collection of items stored in a specific order. In Python, lists are created using square brackets &lt;code&gt;[]&lt;/code&gt;. A list can contain numbers, strings, or even different types of data together. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;students&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Arun&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Vishwa&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Kumar&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Priya&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the list stores multiple student names in a single variable. This makes data management much easier compared to creating separate variables for each value.&lt;/p&gt;

&lt;p&gt;One of the most interesting concepts I learned was indexing. Every element in a list has a position called an index. Python starts counting from 0, which means the first element is at index 0, the second element is at index 1, and so on. Using indexes, we can access specific elements from a list quickly.&lt;/p&gt;

&lt;p&gt;I also learned that lists are mutable. This means we can modify them after they are created. We can add new elements using methods like &lt;code&gt;append()&lt;/code&gt;, insert elements at specific positions, and remove unwanted elements. This flexibility makes lists very useful in real-world applications where data changes frequently.&lt;/p&gt;

&lt;p&gt;Another important topic covered in class was traversing lists using loops. We used &lt;code&gt;for&lt;/code&gt; loops and &lt;code&gt;while&lt;/code&gt; loops to visit each element in a list and perform operations on them. This helped me understand how programs process large amounts of data efficiently. Instead of writing repetitive code, loops allow us to work with all list elements automatically.&lt;/p&gt;

&lt;p&gt;We also practiced several list-based programs. Some of them included finding the minimum and maximum values in a list, removing duplicate elements, checking whether a list is a palindrome, and searching for specific values. These exercises improved my logical thinking and problem-solving skills. Our instructor encouraged us to solve these problems without relying heavily on built-in functions, which helped me understand the underlying logic.&lt;/p&gt;

&lt;p&gt;I realized that lists are used in many practical applications such as student management systems, employee records, shopping carts, attendance systems, and data analysis projects. Since lists can store multiple values and support various operations, they play a major role in software development.&lt;/p&gt;

&lt;p&gt;Overall, today's class was very informative and engaging. Learning about lists has strengthened my understanding of Python programming and data structures. I now feel more confident in working with collections of data and solving programming problems. I look forward to learning more advanced topics related to lists, such as nested lists, list comprehensions, and other data structures in future classes. This lesson has given me a strong foundation that will be useful throughout my programming journey.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>programming</category>
      <category>python</category>
    </item>
    <item>
      <title>For loop</title>
      <dc:creator>Vishwa K</dc:creator>
      <pubDate>Thu, 28 May 2026 11:55:36 +0000</pubDate>
      <link>https://dev.to/vishwa_k/for-loop-14cp</link>
      <guid>https://dev.to/vishwa_k/for-loop-14cp</guid>
      <description>&lt;p&gt;Here’s an expanded version with around 500 words.&lt;/p&gt;

&lt;h1&gt;
  
  
  Understanding For Loop in Programming
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Programming is all about giving instructions to a computer to perform tasks. Sometimes, we need to repeat the same task many times. Writing the same code again and again is difficult and time-consuming. To solve this problem, programming languages provide loops. One of the most commonly used loops is the &lt;strong&gt;for loop&lt;/strong&gt;. A for loop helps programmers execute a block of code repeatedly in a simple and organized way.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a For Loop?
&lt;/h2&gt;

&lt;p&gt;A for loop is a control structure used in programming to repeat a set of instructions for a fixed number of times. It is mainly used when the programmer already knows how many times the loop should run. Instead of writing multiple lines of repeated code, a for loop can perform the same operation automatically.&lt;/p&gt;

&lt;p&gt;For loops are available in many programming languages such as Python, Java, C, and C++. They are very useful in solving repetitive tasks quickly and efficiently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Syntax of a For Loop
&lt;/h2&gt;

&lt;p&gt;In Python, the syntax of a for loop is simple and easy to understand.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;```python id="ndt1d5"&lt;br&gt;
for i in range(5):&lt;br&gt;
    print(i)&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


In this example:

* `i` is called the loop variable.
* `range(5)` means the loop will run five times.
* `print(i)` displays the value of `i` during each iteration.

## Output



```python id="df0fxw"
0
1
2
3
4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The loop starts from 0 and ends at 4 because programming languages usually begin counting from zero.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Does a For Loop Work?
&lt;/h2&gt;

&lt;p&gt;A for loop works step by step:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The loop variable is initialized.&lt;/li&gt;
&lt;li&gt;The condition is checked.&lt;/li&gt;
&lt;li&gt;The code inside the loop is executed.&lt;/li&gt;
&lt;li&gt;The loop variable changes to the next value.&lt;/li&gt;
&lt;li&gt;The process continues until the condition becomes false.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This process helps automate repetitive tasks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages of For Loop
&lt;/h2&gt;

&lt;p&gt;There are many advantages of using a for loop in programming:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Reduces Repetition
&lt;/h3&gt;

&lt;p&gt;A for loop removes the need to write the same code multiple times.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Saves Time
&lt;/h3&gt;

&lt;p&gt;Programmers can complete tasks faster using loops.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Improves Readability
&lt;/h3&gt;

&lt;p&gt;Programs become cleaner and easier to understand.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Increases Efficiency
&lt;/h3&gt;

&lt;p&gt;Loops make programs more efficient by automating repeated actions.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Useful in Data Handling
&lt;/h3&gt;

&lt;p&gt;For loops are widely used for working with arrays, lists, and large amounts of data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-Life Example
&lt;/h2&gt;

&lt;p&gt;A real-life example of a for loop can be seen in attendance systems. Imagine a teacher checking attendance for 40 students. Instead of manually repeating the same process for each student, a computer program can use a for loop to go through all student names automatically.&lt;/p&gt;

&lt;p&gt;Another example is sending notifications to multiple users in a mobile application. The same message can be sent repeatedly using a loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Applications of For Loop
&lt;/h2&gt;

&lt;p&gt;For loops are used in many areas of programming, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Printing numbers and patterns&lt;/li&gt;
&lt;li&gt;Calculating sums and averages&lt;/li&gt;
&lt;li&gt;Searching through data&lt;/li&gt;
&lt;li&gt;Game development&lt;/li&gt;
&lt;li&gt;Web development&lt;/li&gt;
&lt;li&gt;Artificial Intelligence and Machine Learning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because of these applications, understanding loops is very important for every programmer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The for loop is one of the basic and essential concepts in programming. It helps execute repeated tasks efficiently and reduces unnecessary coding. By using for loops, programmers can create cleaner, faster, and more organized programs. Learning the for loop is an important step for beginners because it forms the foundation for advanced programming concepts.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What I Understood from Cracking the Coding Interview</title>
      <dc:creator>Vishwa K</dc:creator>
      <pubDate>Sun, 24 May 2026 06:37:03 +0000</pubDate>
      <link>https://dev.to/vishwa_k/what-i-understood-from-cracking-the-coding-interview-okc</link>
      <guid>https://dev.to/vishwa_k/what-i-understood-from-cracking-the-coding-interview-okc</guid>
      <description>&lt;p&gt;Recently, my mentor gave me the book &lt;em&gt;Cracking the Coding Interview&lt;/em&gt; and asked me to read it carefully. After reading the introduction, I understood many important things about technical interviews, coding skills, and the real expectations of software companies. The book gave me a new perspective on how students should prepare for interviews and careers in the software industry.&lt;/p&gt;

&lt;p&gt;The introduction begins with a story about a candidate who was highly talented but still failed a technical interview. He had a strong academic background, a very good GPA, and experience working on open-source projects. He was intelligent, creative, and hardworking. Even with all these qualities, he was rejected because he could not perform well during the interview process. This story made me realize that academic marks and theoretical knowledge alone are not enough to succeed in technical interviews.&lt;/p&gt;

&lt;p&gt;One of the main lessons I learned from this book is that coding interviews are designed to test problem-solving ability rather than memory. Interviewers are not interested only in whether a candidate knows programming languages or textbook definitions. They want to see how candidates think, how they approach a problem, and how effectively they can develop a solution. The candidate in the story struggled because he could not quickly identify efficient algorithms and made coding mistakes during the interview. This showed me that interviews require strong analytical thinking and practical coding skills.&lt;/p&gt;

&lt;p&gt;Another important point explained in the book is the value of practice. Many students spend a lot of time studying theory from textbooks and learning complex concepts. While these topics are useful, they are not sufficient for interview preparation. The author explains that candidates should practice real interview questions regularly. By solving different coding problems, students can learn common patterns, improve logical thinking, and gain confidence. This helped me understand that daily practice is one of the most important parts of preparation.&lt;/p&gt;

&lt;p&gt;The book also highlights the importance of communication during interviews. Candidates should not only write code but also explain their thinking process clearly. Interviewers observe how candidates analyze the problem, discuss multiple approaches, and improve their solutions step by step. Even when mistakes happen, the ability to correct them calmly is important. This taught me that confidence and communication skills are equally valuable in technical interviews.&lt;/p&gt;

&lt;p&gt;I was also inspired by the author’s passion for teaching. She explains that many talented students fail interviews not because they are weak, but because they prepare in the wrong way. Her goal is to help students understand the interview process and improve their preparation methods. This motivated me to focus more on practical learning instead of only studying theory.&lt;/p&gt;

&lt;p&gt;Overall, &lt;em&gt;Cracking the Coding Interview&lt;/em&gt; helped me understand that success in software interviews requires more than intelligence or academic performance. It requires problem-solving ability, coding practice, logical thinking, and confidence. The introduction itself gave me valuable guidance about how to prepare for my future career. After reading it, I feel more motivated to improve my coding skills, practice interview questions regularly, and become a better software engineer in the future.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>career</category>
      <category>interview</category>
      <category>learning</category>
    </item>
    <item>
      <title>Loops in python</title>
      <dc:creator>Vishwa K</dc:creator>
      <pubDate>Fri, 22 May 2026 12:45:25 +0000</pubDate>
      <link>https://dev.to/vishwa_k/loops-in-python-oom</link>
      <guid>https://dev.to/vishwa_k/loops-in-python-oom</guid>
      <description>&lt;p&gt;&lt;strong&gt;What Is a Loop?&lt;/strong&gt;&lt;br&gt;
Imagine you want to print numbers from 1 to 10. Without a loop, you'd write:&lt;br&gt;
print(1)&lt;br&gt;
print(2)&lt;br&gt;
print(3)&lt;/p&gt;

&lt;h1&gt;
  
  
  ... all the way to 10
&lt;/h1&gt;

&lt;p&gt;With a loop, you write it once and let Python do the work&lt;br&gt;
&lt;strong&gt;The while Loop&lt;/strong&gt;&lt;br&gt;
A while loop keeps running as long as a condition is True.&lt;br&gt;
Syntax&lt;br&gt;
python while condition:&lt;br&gt;
    # code to repeat&lt;br&gt;
Example 1 — Print 1 to 19&lt;br&gt;
python&lt;br&gt;
i = 1&lt;br&gt;
while i &amp;lt; 20:&lt;br&gt;
    print(i)&lt;br&gt;
    i += 1&lt;br&gt;
Output:&lt;br&gt;
1&lt;br&gt;
2&lt;br&gt;
3&lt;br&gt;
...&lt;br&gt;
19&lt;br&gt;
Breaking it down:&lt;/p&gt;

&lt;p&gt;i = 1 → we start counting from 1&lt;br&gt;
i &amp;lt; 20 → keep going as long as i is less than 20&lt;br&gt;
i += 1 → increase i by 1 each time (so we don't loop forever!)&lt;br&gt;
&lt;strong&gt;The for Loop&lt;/strong&gt;&lt;br&gt;
The for loop is Python's preferred way to repeat something a fixed number of times.&lt;br&gt;
Syntax&lt;br&gt;
python &lt;br&gt;
for variable in sequence:&lt;br&gt;
    # code to repeat&lt;br&gt;
Example — Print 1 to 10&lt;br&gt;
python&lt;br&gt;
for i in range(1, 11):&lt;br&gt;
    print(i)&lt;br&gt;
Output:&lt;br&gt;
1&lt;br&gt;
2&lt;br&gt;
3&lt;br&gt;
...&lt;br&gt;
10&lt;br&gt;
range(1, 11) generates numbers from 1 up to (but not including) 11. So we get 1 through 10.&lt;br&gt;
✅ &lt;strong&gt;Summary&lt;/strong&gt;&lt;br&gt;
A loop repeats code automatically.&lt;br&gt;
A while loop runs as long as its condition is True.&lt;br&gt;
A for loop is ideal when you know how many times to repeat.&lt;br&gt;
Use range() with for loops to generate number sequences.&lt;br&gt;
Wrap loops in functions to make them reusable.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>codenewbie</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
