gpt4 book ai didi

python - 为什么 Learn Python The Hard Way 建议到 "Read your .py file backwards."?

转载 作者:太空宇宙 更新时间:2023-11-03 12:13:59 24 4
gpt4 key购买 nike

我正在阅读 Learn Python The Hard Way我真的很好奇他的意思是什么

Read your .py file backwards

最佳答案

练习 41(第 117 页)对其进行了更好的解释。这个片段:

cities['_find']=find_city
city_found=cities['_find'](cities,state)

倒着读是这样的:

  1. state and city are...
  2. passed as parameters to...
  3. a function at...
  4. _find inside...
  5. the dict cities...
  6. and finally assigned to city_found.

关于python - 为什么 Learn Python The Hard Way 建议到 "Read your .py file backwards."?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4461540/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com