1. Do you trust tech articles like "Learn these 5 languages in 20xx because this statistics says these are rising, and SO dev survey also supports it. " ? I followed it for some time, and learnt Python and Java. Why ? Because they are constantly in these lists. And in my company, initially they taught us Python and bash for some scripting work we've to do. Plus the dev work here is done in Java. I'm not in dev, want to go there, hence asking the question. I have done some small projects in Python (tic-tac-toe, some from Al Sweigart's book), and one particularly nasty GUI project where I made an interface like that they used in our snack shop. On project side... I'm weak. I focussed more on data structures and algo problems. I am certified in OCAJP (thank you Jeanne, Scott, Kathy Sierra, Bert Bates, and Elisabeth Robson), because they said interviewers care about it. And two people I know switched from non-dev role to dev based upon that.
2. Do you look for career paths ? Like if you there's demand for front-end, then HTML, CSS, JS and so. I am very new to IT. Undergrad was in electrical. My friends say, front-end means UI/UX programming. I tried to do so in Python, and Java. Didn't like that. Still it is better than what I do now.
4. Or is it like ? You never know enough Java (or any other language). You know the core parts. Okay, go for servlets, JSPs. Here too, when asked for advice, I hear, "Leave servlets, JSPs and so.". Jump to Spring Boot. Nobody uses the former.
5. Lastly, are those who say "Why learn another language?. Two are enough." Just do LeetCode/Hackerrank grind. I say the grind part is good, but not the former.
As you can see, I am thoroughly confused. Maybe if I had a CS background in college, I would've known more CS/IT people and hence known better. But I don't have. Almost everyone I know from college went to electrical jobs as a sales person, and I know I am not one.
I've always advised keeping an eye on what the local job market is requiring. Look at the job boards and see what skills local employers are looking for. Unless have absolutely no qualms about relocating, national trends don't mean that much.
Employers these days generally expect you to do everything up to and including running cables to users' desktops But realistically, front-end and back-end are different skillsets. Front-end is as much about artistic talent as it is about logic. Back-end is more interested into logic, performance and (supposedly) security. As it happens, I'm an awful artist, but I can do very strong back-ends. Which is a liability when people judge your "productivity" on how fast you can start presenting pretty web pages even if there's no back-end to speak of.
Neither Python nor straight Java are really good for front-end work. JavaServer Faces (JSF) can manage front-ends very well, but to provide the acceptable levels of beauty you are best off-augmenting basic JSF with one of the extension libraries.
In practical terms, you should concentrate on the languages and platforms that will pay your bills. But you should always keep an eye towards the future. Things change. The "must-have" skills of CORBA and Ruby on Rails won't get you many job offers these days, and SOAP isn't dead, but it's certainly not as popular as it once was.
Sometimes the only way things ever got fixed is because people became uncomfortable.