Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Python
  4. How to learn Python fast?

How to learn Python fast?

Scheduled Pinned Locked Moved Python
11 Posts 7 Posters 199 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Joan M
    wrote last edited by
    #1

    Hi all,

    A customer asked me to help them to update a Python code, I have never worked in Python.

    Worked with C++, Pascal, C#, VB, VBA, Java... and plenty of industrial device languages (IEC... for PLC, DIN for CNC, RAPID, KRL, ... for robot programming).

    I would like to know of any useful resource which could put me on track rapidly to be able to evaluate the job and decide if I want to take it or not. What web site, tools, anything would you recommend to learn Phyton fast?

    As always thank you in advance.

    https://www.robotecnik.com freelance robots, PLC and CNC programmer.

    1 Reply Last reply
    2
    • CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote last edited by
      #2

      (caveat, I don't know Pyhton :-D )
      Python is very popular so it must be simple. I would worry more about the mess you have to update.
      w3schools tutorial could be a starting point.

      In testa che avete, signor di Ceprano?

      1 Reply Last reply
      0
      • honey the codewitchH Offline
        honey the codewitchH Offline
        honey the codewitch
        wrote last edited by honey the codewitch
        #3

        I learned python in less than a week by porting a couple of significant C# projects to it. It's what I would do. The thing about that is it will give you a good spread of initial knowledge because you'll be creating something working, and as you go it will give you questions to ask google. "How do I do X?"

        R 1 Reply Last reply
        1
        • J Offline
          J Offline
          Joan M
          wrote last edited by
          #4

          Thank you both, w3schools seems a good starting point and yeas, I agree, who knows what I will find there...
          And yes, I will ask them what they want me to do and will think a little bit on that before accepting the job.

          https://www.robotecnik.com freelance robots, PLC and CNC programmer.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jim 0
            wrote last edited by
            #5

            I've had in-person commercial class training in Python, and used it both for work and privately for over 10 years. Of the 15+ programming and scripting languages I have professional experience with (including C, Pascal, C++, Java, Groovy, AWS Lambda, PHP, Perl, SQL, etc.), it is my go-to choice when it's an option.

            There are many free resources for learning Python, for example freecodecamp.org, as well as many inexpensive ones like Udemy ($15-$30), but verify their pricing in advance. Some of these online courses can be completed in a week.

            The Python programming landscape is rich and complete including professional tools like the free PyCharm IDE (based on IntelliJ). Python is typically listed in the top three or four languages in both use and popularity in surveys such as tiobe.com and survey.stackoverflow.co. Several books are listed below. In my (limited) experience, ChatGPT can write reasonable Python.

            Perhaps some background might help inform your decision...

            Python has been publicly available for free since 1991, and has had several major version releases, making it a mature and refined language.

            I would not say Python is "simple", but rather "elegant", in that it has many built-in features that greatly simplify common coding tasks. It is also augmented by a massive library of native and 3rd party packages (pypi.org) that allow for very rapid and feature-rich development. The availability of a TensorFlow package has made Python a very popular tool for many for AI.

            That said, although doing things "Pythonically" can lead to succinct, effective and rapid code development, there is a built-in bias for certain coding paradigms like mandatory indentation, no "go to" or classic array data structure, 100% object-based, and optional data typing ("duck typing") which seem to be some of the biggest paradigm shifts for some who are considering its adoption.

            It's also primarily an interpreted language (so often slower than compiled programs) and usually requires installation of the interpreter for deployment, although compilers that can generate executable images do exist. Package management can be problematic at first. OTOH, it's pre-installed on many Linux distributions. It is thread-capable and can perform asynchronous operations. It can be used for OO, procedural, functional or imperative programming.

            For me, a downside is the use of syntactic elements for leveraging objects and features. For example, creating a set can be done with curly braces, as in
            my_set = {1, 2, 3}, but if you attempt to use that syntax to create an empty set, you instead get a dictionary. I can never keep track of which brace or bracket to use, and what native methods are available for which.

            I think the Python user experience is enormously subjective, so its important to find learning resources appropriate for personal style and way of thinking. I would never suggest using something like leetcode.com to learn programming. But for someone with a lot of programming experience, the interview prep tool offers a unique way to compare coding solutions for the same problem in many languages, and could be useful to some who are more problem focused rather than conceptually-oriented.

            I asked Google Gemini about practical Python programming books, and it responded:

            For learning practical Python, Automate the Boring Stuff with Python and Python Crash Course are excellent for beginners, while Fluent Python and Python Cookbook are recommended for intermediate and advanced users seeking in-depth knowledge and idiomatic coding. Other great choices include Effective Python for writing better code and books like Python for Data Analysis for specialized data science work.

            I've not used any of these though I think I own a couple.

            Gemini also said: "There's more than one way to do it" (TMTOWTDI) is a motto associated with the Perl programming language, reflecting its design philosophy of providing flexibility and multiple options for programmers to solve a problem... unlike languages like Python, which emphasize a single, obvious way...

            YMMV!

            Good luck!

            Jim

            1 Reply Last reply
            2
            • honey the codewitchH honey the codewitch

              I learned python in less than a week by porting a couple of significant C# projects to it. It's what I would do. The thing about that is it will give you a good spread of initial knowledge because you'll be creating something working, and as you go it will give you questions to ask google. "How do I do X?"

              R Offline
              R Offline
              Reverend Jim
              wrote last edited by
              #6

              @honey-the-codewitch You didn't learn Python in a week. You learned some of the syntax but you didn't learn the idioms and what constitutes good and bad design (in Python). It takes much longer than a week to learn how to think in a new language.

              honey the codewitchH 1 Reply Last reply
              0
              • R Reverend Jim

                @honey-the-codewitch You didn't learn Python in a week. You learned some of the syntax but you didn't learn the idioms and what constitutes good and bad design (in Python). It takes much longer than a week to learn how to think in a new language.

                honey the codewitchH Offline
                honey the codewitchH Offline
                honey the codewitch
                wrote last edited by
                #7

                @Reverend-Jim It's interesting that you can tell a complete stranger what they did or did not do without witnessing the event.

                I ported two of my major projects from C# to Python.

                Yes I learned it in a week.

                Sorry guy, some people can just do things you apparently can't. It's a big world.

                Graeme_GrantG CPalliniC 2 Replies Last reply
                2
                • honey the codewitchH honey the codewitch

                  @Reverend-Jim It's interesting that you can tell a complete stranger what they did or did not do without witnessing the event.

                  I ported two of my major projects from C# to Python.

                  Yes I learned it in a week.

                  Sorry guy, some people can just do things you apparently can't. It's a big world.

                  Graeme_GrantG Offline
                  Graeme_GrantG Offline
                  Graeme_Grant
                  wrote last edited by
                  #8

                  @honey-the-codewitch said in How to learn Python fast?:

                  Yes I learned it in a week.

                  93e883ae-cfcb-4d5e-93e9-17a3ba83f4ec-image.png

                  Now I'm ready to learn...

                  “I fear not the man who has practised 10,000 kicks once, but I fear the man who has practised one kick 10,000 times.” - Bruce Lee.

                  1 Reply Last reply
                  0
                  • honey the codewitchH honey the codewitch

                    @Reverend-Jim It's interesting that you can tell a complete stranger what they did or did not do without witnessing the event.

                    I ported two of my major projects from C# to Python.

                    Yes I learned it in a week.

                    Sorry guy, some people can just do things you apparently can't. It's a big world.

                    CPalliniC Offline
                    CPalliniC Offline
                    CPallini
                    wrote last edited by
                    #9

                    Sorry guy, some people can just do things you apparently can't. It's a big world.

                    That made my day
                    :-D

                    In testa che avete, signor di Ceprano?

                    1 Reply Last reply
                    0
                    • P Offline
                      P Offline
                      Prahlad Yeri
                      wrote last edited by
                      #10

                      Think of it this way: if C++ or PHP is like a practical working language everyone uses to get things done, Python is like a language designed for poets — clear, elegant, and minimal. It avoids braces and symbols in favor of readable, indented, almost sentence-like code. If you ever enjoyed coding in C++, Python will bring the added freshness of serenity and elegance to the table.

                      1 Reply Last reply
                      0
                      • honey the codewitchH Offline
                        honey the codewitchH Offline
                        honey the codewitch
                        wrote last edited by
                        #11

                        A) Python was designed to be easy to learn.
                        B) I've been coding for very close to 40 years, including much more daunting languages I use daily like C/++
                        C) Good practices transcend language.
                        D) I said I learned the language in a week. I did not say I achieved mastery of the language in a week.
                        E) If I seemed rude, it was only because it's rude to accuse a complete stranger of lying and/or bullshitting.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups