You mean that is how an .exe file is created, right?
Basically, yeah, though it doesn't necessarily have to have the .exe extention
And it is not only safer but it sounds more practical to use a compiler, it would be like using word without spell check. Python being unsafe is presumably why it is usually compiled into byte code first before it is uploaded because it just makes more sense to know ahead of time whether you have a syntax error or not. Most people do not sacrifice quality for a quick fix. Which will be more smooth when running, of course something that is built without checking for accuracy will be completed faster than something gets checked.
It's kind of like using Word without spellcheck yeah lol but again, you're generally choosing to use an interpreted language for different reasons than a compiled language, in a situation where it makes sense to sacrifice safety for a faster development time - to continue your analogy, if you're just writing a rough draft or a note to yourself, you might not care about spellcheck, and may not even care about formatting and opt to write it in a faster plain-text editor instead. As well as not needing to spend time compiling, a lot of interpreted languages have the philosophy of "get more done with fewer lines of code" which makes them great for prototyping or making a proof-of-concept e.g., to show a client what the finished product might look like without having to actually *make* the finished product. They're also often used to create front-end interfaces, where safety is less of a concern because all the interface is doing is getting input from the user, passing it to the back-end program written in a more secure compiled language, then getting output from the back-end and passing it to the user. And sometimes it's just the most practical option under the circumstances, especially if it's not going out into the world to be used by others (as an example: my sister is an astrophysics student and spent last summer as a research assistant. They used programs written in C to run simulations and analyze data because there's lots of open-source programs already available that can be easily modified, it's flexible, and it's relatively safe (C will let you do a lot of stupid things, but at least you generally have to explicitly tell it "I'm doing this stupid thing on purpose"), but used Python to actually take that data and put it in a readable/presentable form, because doing that in C is a huge pain, especially when you're not actually a programmer and C compilers tend to give very cryptic error messages)
Although, I suppose if you were a confident programmer, then you would be more likely to trust yourself and choose an interpreted program every time.
Not necessarily - I know lots of experienced programmers that
hate interpreted languages because it's too easy to make a mistake, and personally of the languages I've learned so far in school, I vastly prefer C and Java over the interpreted languages we've learned (Perl, Python, and JavaScript). And interpreted languages run more slowly because they have to be, well, interpreted *as* they're running, so as soon as you get past the prototype/demo stage or get into anything complicated, you're generally going to want to go with a compiled language, not just because it's safer, but because it will run much faster. (again, to go back to my sister's research, she switched to Python at one point for analyzing data because it's a much easier language, but switched back to C fairly quickly because it just took so long for the program to run. And in my own experience, reading in and analyzing several large csv file in Perl was super easy to code, but the run time was
significantly longer than similar programs I've had to write in C - though much less frustrating because string handling in C is horrendous, and as much as I don't like Perl, I would definitely take the longer running time in Perl over fighting with segfaults in C any day if all we're talking about is a quick-and-dirty analysis of text/csv files and not a fully functioning program)