Skip to main content

How To Learn Python If You Already Know A Different Programming Language

I knew C before I learnt Python. There are differences between the languages, but, it is very easy if Python is your second language.

Why learn Python? C has tens of lines of codes which could be done within one line with the help of Python Libraries. Python is just easier and equally powerful. It is also a great scripting language if you wanted to learn a scripting language.

If you have a programming background, Python is pretty straightforward to pick up. The most onerous task is learning the libraries and idioms.

You already know how programs work and you might have an idea about programming methodology. This makes learning Python a simple process. If you're learning Python and want to do it fast, I recommend this:

Learn X in Y minutes(Python)

This will teach you the keywords and syntax in a matter of minutes.

Most people don't know this, but the official Python docs are a goldmine.
It is very well written and is as good as any book. Already knowing how to program in a different programming language just makes it easier to understand using these docs.

Official Python Docs

Here are a few other resources that might help you:

A quick introduction:

Python Syntax in 5 Minutes! 

If you already know Java, use this:

Python for Java Programmers

If you already know JavaScript:

Python for JavaScript Programmers Made Easy

You could also use a book like Dive Into Python

Other helpful links:

For Python libraries, you need to specialize in the libraries that might be useful for you.

  • For Web Development(Frameworks): Django, Flask, Web2Py, TurboGears etc
  • If you're doing number crunching you'll almost certainly want to become familiar with the Numpy and Scipy libraries
  • The Requests library is the defacto standard for making HTTP requests in Python. It abstracts the complexities of making requests behind a beautiful, simple API so that you can focus on interacting with services and consuming data in your application.
  • Beautiful Soup is a Python package for parsing HTML and XML documents. It creates a parse tree for parsed pages that can be used to extract data from HTML, which is useful for web scraping.
  • If you are involved in web-scraping then this is a must have library for you. After using Scrapy library you won’t use any other. 
  • You could learn something like SQLAlchemy for databases.
  • If you're into game development, PyGame is the library for you!
  • For Machine Learning, you could look into something like TensorFlow, Scipy or PyTorch
  • For Data Science, go for Pandas and Matplotlib 
  • For Network Programming, paramiko, socket, tftpy, HTTPLib2
  • IPython
Note: These are not all the libraries. There are hundreds of libraries, the libraries mentioned here are just examples of some popular ones. You'll need to do a bit of Googling to find out which Python Library is best for you to learn.

 

The Best Way to Learn:

These links will just help you to learn the basics. But, the best way to learn is to start programming right away.

Choose a big project you like to build or something you've already built and BUILD IT USING PYTHON.

This will automatically make you learn. You could use websites like Reddit or StackOverflow to get your queries and doubts answered.


Final Thoughts: 

JUST START. Learn the syntax and the keywords and START WITH A PROJECT. Python is easy to learn but a very powerful language. 

My advice is to find a problem and set off to solve it with Python. You will learn a lot in the process.

You already know the concept, its just learning the syntax and a few extra thing because it works slightly differently.

Happy Coding!


Thanks for reading,

AZID








Comments

Most Viewed Content:

Best Reddit Subreddits for Cybersecurity and Hacking!

Reddit is a very useful website for discussions about everything. For cybersecurity and hacking too, it has useful subreddits, in which, you will learn a lot of things you previously had no knowledge of. So, I have compiled a list of security related subreddits. 1. Active and Most helpful subreddits: /r/netsec /r/AskNetsec /r/netsecstudents These three are pretty much it. They have very active communities and are very helpful. I, personally use  /r/netsecstudents a lot because I'm still in the process of learning and that subreddit(if you look properly) will tell you how to make a career in every security field. 2. Security Certification Subreddits: r/CompTIA (for Security+) r/ccna (for CCNA and CCNA Security, also r/ccnp for CCNP) r/CEH (for CEH) r/cissp (Certified Information Systems Security Professional) r/oscp (Offensive Security Certified Professional) Really helpful if you're doing any of these Certs. 3. Other...

I gave my first talk at a Security Conference

Last month I gave a fun little talk called "Plenty of Phish in the Sea" in my local security conference. It was a fun presentation on how I phished my friends in high school.  I used to make music back in high school and sent a phishing link to 3 of my best friends to my "Soundcloud" and asked them to sign in through their email. I had created a fake domain that copied the Soundcloud login page but the form to submit username and password had a php script that sent the credentials to a txt file I had on the server.  My friends had weird passwords of course, one guy had his girlfriends name, another had his favourite sport mentioned, and another friend literally had his whole phone number as his password.  I made jokes about it and kept the whole tone of the presentation humorous.   This talk wasn't very technical, but it was my first time and this was an actual experience. Hopefully, next time my talk is a technical one, where I teach the audience something I le...

How To Install And Use Cisco Packet Tracer For CCNA

If you're using Packet Tracer for your CCNA preparations, then this guide will help you. I well tell you how to install Packet Tracer and some basic ways you can use Packet Tracer for the CCNA. Installation - Go to this link. Click on Sign up and fill all the required details. I recommend you to use your own email address as you have to keep signing in when using Packet Tracer. You will get a similar page after creating an account. Click on Launch Course. Now you will be directed to the Packet Tracer course page.     Now click on Student Resources. You will get the following page: Scroll down on the page and click on Download and install the latest version of Packet Tracer. You will be taken to this page:     Click on the version on Packet Tracer you want to download. I will download the latest version of Packet Tracer and I recommend you to do the same. I will download Cisco Packet Tracer 7.2.1 You will be taken to a page with...