Python in 8 minutes (compared to Java)

preview_player
Показать описание


0:00 - Java printing text
2:00 - Python printing text
2:30 - Java storing data
3:40 - Python storing data
4:30 - Java Loops
6:00 - Python Loops

Java vs Python java or python
#python #java #neetcode
Song: Bamboo by Oak Studios
Creative Commons - Attribution ND 4.0
Рекомендации по теме
Комментарии
Автор

"Texas Smash" "Detroit Smash" Someone likes My hero Academia.

blankfornow.
Автор

I can really see the benefits of learning Java instead of Python as your first programming language as someone who's just about to finish his first semester in computer science. Java teaches you A LOT of fundamentals that are done in the background for you in Python. The steps leading to learning Python if you know Java are also going to be much easier than the opposite.

ZedsDeadXO
Автор

My first programming language was C, so I loved Java when I started it. Then i discovered python!

Thank you for watching, feel free to leave any feedback! like/sub to support the channel it helps out a lot : ^ )

NeetCode
Автор

I have used java for almost 4 years at work and used to LC in java for a long time. But now I have decided to move to Python because it saves time during the interview.

suryac
Автор

This is a great intro to some of the differences, thank you.

AlexBastuba
Автор

Cool, I'm gonna do leetcode in python from now on. That way I can more focus on the logic and pattern rather than the code. Thanks!

saksham
Автор

In Java you could've done data.forEach((k, v) -> System.out.println(k + "=" + v));

Also for the hashmap:
Instead
import static java.util.Map.entry;

Map<String, String> map = Map.ofEntries(entry("Texas", "Smash"), entry("Detroit", "Smash"));

If you learn Java properly, you can make the code as short as python, and (in my opinion) more readable

Skycrafter_
Автор

love you man! Thanks for your amazing videos and advice. I've just begun my leetcode journey and I'm loving all of the learning curves, steep and easy. Your vids are perfect for me.

jinettew.
Автор

Oh nice! This is really helpful, me trying to learn Python syntax

AnnabellaGuzheng
Автор

I was comfortable with python earlier and used to code in python as its very easy to code. It helped me build ml models too.But my company told me to learn java/cpp as it is more useful there. Now i forgot python and coding in java and feeling bad as i missed python 😔.

surya
Автор

Thank you for this video! Starting to learn these two languages, very fascinating to see the similarities and differences between these programming languages.

Lara-zwvb
Автор

Kinda sad nobody picked up on the MHA references

nafis
Автор

You've got it all figured out. Python3 is the way to go for LC-style interviews.

Would it be possible for you to make a video on the syntax and all for usage of various data structures in Python? This video could be just a compilation of all the operations commonly used in all the data structures in LC type questions. Basically just what would be enough to be able to convert english -> python code. Built-in functions used on the regular and other such tidbits. Having one 10-15 min concise video on this would greatly help!

whytushar
Автор

Can you please add tutorials for java . you explain really well

sap
Автор

The java code above is the naive approach. The above java code can be rewritten as
Map<String, String> data = Map.of("Texas", "Smash", "Detroit", "Smash");
System.out.println(data);
data.forEach((key, value) -> System.out.println(key + "=" + value));

dinov
Автор

Finally someone who uses MHA as reference ;) 👍🏻

mohithadiyal
Автор

This is so true! And I started brushing up on my old python 2 weeks before my technical interview, god wish me luck! LOL

RenanHiramatsu
Автор

Blows my mind how simple Python is compared to Java

Anthonydp
Автор

Actually in Java you can iterate over key/value pairs of hashmap too, using map.entrySet() method instead of map.keySet(), but still the syntax is not so concise as in Python for sure

for_whom_the_bell_tolls
Автор

IMO I learned Java first and enjoy using it for interviews. I also think the language is powerful when using TreeMaps, PriorityQueues, as well as being able to use Lambdas to dynamically define sorting or comparators. Haven't used Python enough to know if it has those things out of the box.

RatherPleasent
join shbcf.ru