TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Exercises to learn new programming languages

1 点作者 jareds大约 1 个月前
Are there any good sites that provide exercises for learning a new programming language with out focusing on algorithms? I'm currently using AI tools with Python to write code with out much Python experience. While I can read and understand the code I feel like I have a surface level understanding of Python syntax. I'd like to go through exercises that focus on language features like loops, maps, etc, instead of algorithm focused sites such as LeetCode.

3 条评论

pvg大约 1 个月前
The official Python tutorial is like that as are many of the more 'traditional' Python books and guides, with many focusing on exercises for the just-covered material. Somewhat out of style these days but they are plentiful.
pestatije大约 1 个月前
<a href="https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;tutorial&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;tutorial&#x2F;index.html</a>
zahlman大约 1 个月前
The other replies (two at time of writing) suggested the tutorial built in to the Python documentation, specifically for Python, and I&#x27;d recommend it as well.<p>If you specifically want to practice using language features, you could start by taking a LeetCode etc. problem you find easy, and deliberately trying to write the code in different ways.<p>Oh, but take out the boilerplate that they want you to use for their automated testing. Test it yourself at the REPL, and make sure you have a good idea for what sorts of inputs to test with (and that you know what output to expect).<p>And, if you&#x27;re feeling adventurous, read through the documentation for the `unittest` standard library and figure out how to test it yourself. Then look up Pytest and try to use that instead.<p>But you might be better served by trying to think of your own exercises, honestly.