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:

OverTheWire Bandit: Level 0-14

Bandit Levels Levels 0-14 Levels 14-25 Levels 25-33 Please use Ctrl+F to find your desired Level. Level 0 Bandit Level 0 Level Goal The goal of this level is for you to log into the game using SSH. The host to which you need to connect is bandit.labs.overthewire.org, on port 2220. The username is bandit0 and the password is bandit0. Once logged in, go to the Level 1 page to find out how to beat Level 1. Commands you may need to solve this level 2/31 ssh kali@kali:~$ ssh bandit0@172.9.9.176 -p 2220 password: bandit0 Level 0 -> Level 1 Level Goal The password for the next level is stored in a file called readme located in the home directory. Use this password to log into bandit1 using SSH. Whenever you find a password for a level, use SSH (on port 2220) to log into that level and continue the game. Commands you may need to solve this level ls, cd, cat, file, du, find Password for next level: boJ9jbbUNNfktd78OOpsqOltutMc3MY1 Level 1 -> Level 2 Level Goal The password for the next le...

Final Year Project

I'm in the final semester of my degree and my project is something I've been thinking about for a while. I want to solve a problem, so I formed a team and now the project we are planning on creating is "DDoS Detection". We want to create an app which detects DDoS attacks and stop them live. I haven't really started doing much, but first thing I want to do is get datasets. I will search online for datasets on DDoS attacks. My mentor mentioned that I could create a virtual network in VirtualBox and simulate different types of attacks with some programs I can find online. That sounds pretty interesting and I'm going to do some research and find out if thats something I can do.   2 of my teammates are also helping me write code, we plan on using Python and a machine learning library, mostly Keras, to train the model and learn patterns. Lets see how it goes.

CEH v10 Write-up | Certified Ethical Hacker | 2020

On July 10th I passed the CEH with 105/125 questions right and this is the write up to the exam and certification. I got really interested in the CEH because it was a well known certification and the syllabus really interested me. I also had a ton of recommendations online and from people in this industry saying that the CEH was a really good beginner level security certification. Details about the exam and course: I bought the course from the EC-Council website. There are certain requirements if you want to take this certification. You should either have 2 years experience or buy their online iClass to attempt the exam. As I did not have the required experience I bought the online course. The EC-Council website and how everything works with them is very confusing and I got very confused at times. But thankfully, the customer support answered all my questions and guided me through the buying process and the registration. The course costs $1100 USD in India but I bought the course durin...