If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

Python Learning Journey

Started by Dcliniq, Jan 26, 2024, 12:17 AM

Previous topic - Next topic

DcliniqTopic starter

Python is my first programming language. I began my journey by reading Mark Lutz's book "A byte of python", which not only introduced me to the language but also included practical tasks, such as creating an Address Book program for the command line.



This program should enable the user to view, add, change, delete, or search for contact details, and store this information on disk for later access. Despite the simplicity suggested by the book, I found the task daunting. Looking at the code felt overwhelming, and I anticipated spending at least a week to complete it.

Recognizing that practice is crucial, I decided to complement my learning with practical exercises on platforms like codewars while simultaneously delving into other Python books such as "Learning Python" by Mark Lutz and "Simple Python: A Modern Programming Style" by Bill Lubanovich.

Now, I have a question for you: How did your initial study of Python go? Were you able to implement the Address Book program using just one book, or did you find the need to explore additional resources? If you are already proficient in Python, I would love to hear about your learning journey and any tips you may have.
  •  


dany

My journey with Python was both challenging and rewarding. When I first started learning Python, I found myself immersed in the vast world of programming languages. Coming from a background in web development, I was accustomed to languages like HTML, CSS, and JavaScript, which made Python's syntax and structure quite different for me.
To begin my Python learning journey, I chose to dive into "Python Crash Course" by Eric Matthes, which provided a comprehensive introduction to Python programming. The book included practical examples and projects, allowing me to apply what I learned in a hands-on manner. However, when it came to implementing the Address Book program, I found myself faced with the complexities of file handling, data structures, and user input validation.

While "Python Crash Course" was an excellent starting point, I realized that I needed to explore additional resources to fully grasp the concepts required to build the Address Book program. I supplemented my learning with online tutorials, documentation, and community forums where I could seek guidance and learn from others' experiences.

Moreover, I delved into other Python books such as "Fluent Python" by Luciano Ramalho and "Effective Python" by Brett Slatkin, which provided valuable insights into writing Pythonic code and leveraging the language's features to their fullest potential.

Through consistent practice and exploration of diverse learning materials, I gradually gained the confidence and skills to implement the Address Book program and tackle more complex projects. My advice to anyone learning Python is to embrace the challenges, seek out diverse resources, and engage with the vibrant Python community. The journey of learning Python is an ongoing process, and each new project or concept is an opportunity for growth and mastery.
  •  

greenNonstick

When starting a new task, it's crucial to first formalize the requirements. For instance, envision the data structure for a "Contact" - it typically includes fields like "Last name, First name, Patronymic, email, phone." Additionally, consider how the contacts will be stored on disk, often in a CSV format, where each line represents a separate contact and the fields are separated by commas.

After understanding the main task, it's essential to outline the subtasks and organize them logically. Once this is done, the next step involves implementing these actions as code in the chosen programming language. The specific language may influence the set of actions, so adjustments might be necessary.

To further understand how to work with files in Python, one can utilize external resources such as searching for "python working with files" or referring to relevant chapters in documentation. Over time, familiarity with these examples will reduce the need for frequent searches.

When learning Python, the focus often revolves around grasping and comprehending examples of solving specific sub-tasks, including handling files, databases, network operations, and graphical user interfaces. Each of these areas may require tailored approaches, depending on the specific graphic library being used, such as GTK, Qt, wX, Tk, or Kivy.
  •  

ovlyi

I always believe in merging theory with practical application. Each time I delve into a new chapter, I immerse myself in solving tasks, referencing back to the theory when needed, as it's impossible to retain all information at once. There are days when I dedicate myself entirely to a single task, and eventually, I find that with each subsequent task, my familiarity with the tools (useful functions, modules, methods) allows for quicker problem solving.

I haven't delved into "A byte of python" yet, but have made good progress with "Python for Network Engineers," having completed about 20% of the book, which includes 2 chapters covering the Basics of Python and Code Reuse.

Although I haven't yet tackled a specific problem, I've already formulated a plan:
1. Utilize the argparse module for efficient interaction with the script from the command line.
2. Store data either in a database, .txt file, or as an object, such as a dictionary for easy access.
3. Develop functions for viewing, adding, modifying, deleting, or searching for contact information connected to the stored data.

The essence lies in understanding the tools of Python - the different data types, their properties, and how to manipulate them, functions, methods, operators, and loops. Despite my limited knowledge so far, I have successfully automated repetitive tasks at work, making my job much more manageable.

Whenever faced with something unfamiliar, I resort to a straightforward Google search. For instance, when I grew tired of repeatedly inputting logins/passwords for switch logins, I turned to Google, often finding valuable information in English. This led me to explore the pexpect module, study its documentation, and ultimately write my own script. Now, the pexpect module has become another addition to my knowledge bank, enhancing my problem-solving abilities for future challenges.
  •  


If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...