Question:
Benefits of Learning Python?
?
2010-02-19 17:41:09 UTC
What are the Benefits of learning Python if i already know a couple other languages? I mean i asked my programming teacher and she said they dont use python for making programs in buisness.I might be installing linux as my operating system since it has open source and will learning python help me edit the source?
Five answers:
Pete S
2010-02-19 17:54:50 UTC
Some Linux applications do use Python, but the OS itself is written in C.



Python is used in some shops contrary to what your programming teacher has said, in fact Google uses it quite a bit. HP uses it for system configuration on new PCs.



Python allows for rapid development, when the extra structure is really getting in the way. Maybe I want to parse a website for information and structure it. I could do this in C++, Java, or C#, but python really shines in this case.

Or maybe I want to write glue code to tie together some command line programs in an advanced shell script, again python or perl is good at this, although python encourages readability over perl. Game engines use a scripting language like lua or python inside of them to facilitate rapid development.

Want to edit a csv file and remove all lines containing a 0 anywhere in the line?



f = open('myfile.csv','r')

data = f.readlines()

f.close()

data = filter(lambda line: not '0' in line,data)

f = open('myfile_processed.csv','w')

f.write('\n'.join(data))

f.close()



You can't do that in 7 lines in C using just the standard libraries, and I'm not aware of being able to do that in 7 lines in Java.
anonymous
2016-11-14 09:18:22 UTC
Advantages Of Python
anonymous
2016-04-06 09:41:35 UTC
For the best answers, search on this site https://shorturl.im/av67M



Python isn't just a scripting language. Python can be a full blown programming language. It's very versatile and has many benefits. I personally like Python very much as a "quick to get things done" language. Python is like a kitchen. There is about every tool to get things done, but it is up to the chef (programmer/you) to make sure you utilize the best utilities for the job. There are tons of ways to get things done, but some obviously work better than others. Now what makes python so great. The ability to interact with other languages. You can have Python interact with C/C++, Fortran, Java, CUDA, and many other languages. I like Python to contain my interfaces, but not do the meat of the program (I work on computational sciences, so Python is just too slow). I like the language.
anonymous
2010-02-19 17:59:43 UTC
UNIX is entirely written in C; Linux as based partly on the idea of UNIX is mostly written in C - the kernel is written in C and Assembly entirely.



Most of Linux's libraries and packages are written in C and C++ some really critical stuff is written in assembly.



As for Python, Python is very niche, its only used for very specific purposes and even then its only really used as a scripting language tacked onto an existing system that's been written in another language. Python is not used in the Linux source code. Some applications and utilities may be written in it but they won't be part of the OS, they'll be add-ons.



I don't like Python, I started learning it and stopped, the Python mentality is that there should be one clean and clear way to do things, instead of having many different ways, that to me showed a lack of choice. The language itself provides most expected functionality but most books teaching it advocate this mentality and it gets really annoying and frustrating really quickly.



Python is very much a Geek language, I know C, C++, C#, Java, VB6, VB.NET, I would suggest you don't learn it. Learn C++, and C especially if you are interested in Linux they will be of a lot more use to you.



Also as a side note, although Linux is open source, this does not mean you can edit the code of the operating system you are running as you are running it, you need to download the source files from the distribution's web site, change it as you see fit, compile it then use the terminal to replace the existing components with your customised ones. The source will be .c .cpp and .h files as well as a variety of others.
?
2015-02-19 16:53:42 UTC
At the end of the day It doesn't matter what programming language you learn, the only thing that matters is learning how to solve problems and learning how to deal with logical situations, Python is easier to get started with and there isn't much to learn about it(its a small language) once you mater python languages like C will be a breeze anyways.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...